---
src/util/virbuffer.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c
index 969dcbf..693e4b2 100644
--- a/src/util/virbuffer.c
+++ b/src/util/virbuffer.c
@@ -153,10 +153,9 @@ virBufferAdd(virBufferPtr buf, const char *str, int len)
if (!str || !buf || (len == 0 && buf->indent == 0))
return;
- if (buf->error)
- return;
-
indent = virBufferGetIndent(buf, true);
+ if (indent < 0)
+ return;
if (len < 0)
len = strlen(str);
--
1.7.11.7