]> git.proxmox.com Git - qemu.git/blobdiff - error.c
qemu-nbd: print error messages from the daemon through a pipe
[qemu.git] / error.c
diff --git a/error.c b/error.c
index b80275261c476c27b88ffb767e48ecc412160f96..990050f792f73b7dd04221e3e371ace802fcc456 100644 (file)
--- a/error.c
+++ b/error.c
@@ -12,8 +12,9 @@
 
 #include "qemu-common.h"
 #include "error.h"
+#include "qjson.h"
+#include "qdict.h"
 #include "error_int.h"
-#include "qemu-objects.h"
 #include "qerror.h"
 
 struct Error
@@ -97,6 +98,10 @@ bool error_is_type(Error *err, const char *fmt)
     char *ptr;
     char *end;
 
+    if (!err) {
+        return false;
+    }
+
     ptr = strstr(fmt, "'class': '");
     assert(ptr != NULL);
     ptr += strlen("'class': '");