Message ID | 1314984898-19141-2-git-send-email-aliguori@us.ibm.com |
---|---|
State | New |
Headers | show |
diff --git a/error.c b/error.c index b802752..68c0039 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': '");
Reported-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- error.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)