aboutsummaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-10-10 08:21:46 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-10-10 08:21:46 -0500
commitebffe2afceb1a17b5d134b5debf553955fe5ea1a (patch)
tree223ee0630a56a8d1410d5ad283996486ec434ab7 /error.c
parent057643f6c4751651ab640edb9b445cb3816edffc (diff)
parent5bc465e4b1b6f4582a400c0a7033a1c841744278 (diff)
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Diffstat (limited to 'error.c')
-rw-r--r--error.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/error.c b/error.c
index b80275261c..68c0039dba 100644
--- a/error.c
+++ b/error.c
@@ -97,6 +97,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': '");