diff options
author | John Ralls <jralls@ceridwen.us> | 2013-03-01 10:13:20 -0800 |
---|---|---|
committer | John Ralls <jralls@ceridwen.us> | 2013-03-01 10:14:59 -0800 |
commit | 54ffc982e96bc4b2484a2611c7dc5cf24c4c4a1a (patch) | |
tree | e7604dcac46e6b7abd92ff6cf7825cbb0a934df2 /modules | |
parent | c7cf93778927ba6c59cb7a8627e805a1560890f1 (diff) | |
download | gtk+-54ffc982e96bc4b2484a2611c7dc5cf24c4c4a1a.tar.gz |
Fix gtkprintbackendcups crash
From trying to call g_list_delete_link with a NULL node or
removed_printer_checklist.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 96f4be4103..8dbc78bf89 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -2067,11 +2067,15 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend, } /* remove name from checklist if it was found */ - node = g_list_find_custom (removed_printer_checklist, - info->printer_name, - (GCompareFunc) find_printer); - removed_printer_checklist = g_list_delete_link (removed_printer_checklist, - node); + if (removed_printer_checklist != NULL) + { + if (node = g_list_find_custom (removed_printer_checklist, + info->printer_name, + (GCompareFunc) find_printer)) + removed_printer_checklist = + g_list_delete_link (removed_printer_checklist, + node); + } printer = gtk_print_backend_find_printer (backend, info->printer_name); if (!printer) |