Guard against a message retrieval before library initialization.
This commit is contained in:
parent
b12a8fd219
commit
1bd5a10ac9
@ -121,6 +121,9 @@ int iso_msgs_obtain(char *minimum_severity,
|
|||||||
char *textpt, *sev_name;
|
char *textpt, *sev_name;
|
||||||
struct libiso_msgs_item *item = NULL;
|
struct libiso_msgs_item *item = NULL;
|
||||||
|
|
||||||
|
if (libiso_messenger == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = libiso_msgs__text_to_sev(minimum_severity, &minimum_sevno, 0);
|
ret = libiso_msgs__text_to_sev(minimum_severity, &minimum_sevno, 0);
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user