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>
This commit is contained in:
parent
d11cf8cc80
commit
acceb4d99f
4
error.c
4
error.c
|
@ -97,6 +97,10 @@ bool error_is_type(Error *err, const char *fmt)
|
||||||
char *ptr;
|
char *ptr;
|
||||||
char *end;
|
char *end;
|
||||||
|
|
||||||
|
if (!err) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ptr = strstr(fmt, "'class': '");
|
ptr = strstr(fmt, "'class': '");
|
||||||
assert(ptr != NULL);
|
assert(ptr != NULL);
|
||||||
ptr += strlen("'class': '");
|
ptr += strlen("'class': '");
|
||||||
|
|
Loading…
Reference in a new issue