mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
printing: Don't crash when printer-state-message not provided
Check whether "printer-state-message" was returned before its usage. https://bugzilla.gnome.org/show_bug.cgi?id=699750
This commit is contained in:
parent
a725b06363
commit
bdf40603d5
@ -2320,7 +2320,7 @@ set_info_state_message (PrinterSetupInfo *info)
|
||||
|
||||
if (info->reason_level >= GTK_PRINTER_STATE_LEVEL_WARNING)
|
||||
{
|
||||
if (strlen (info->state_msg) == 0)
|
||||
if (info->state_msg == NULL || info->state_msg[0] == '\0')
|
||||
{
|
||||
g_free (info->state_msg);
|
||||
info->state_msg = reason_msg_desc;
|
||||
|
Loading…
Reference in New Issue
Block a user