diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-09-02 12:34:44 -0500 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-04 11:00:46 -0300 |
commit | acceb4d99fcdabded6ba432402365adb63205196 (patch) | |
tree | 1447cab6860bfa9e92a15e46c8b05346546a8ac5 /error.c | |
parent | d11cf8cc80d946dfc9a23597cd9a0bb1c487cfa7 (diff) |
error: let error_is_type take a NULL error
Reported-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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': '"); |