gtkicontheme: Check a return value

We were already looking at the error anyway, but rewriting things
this way lets coverity see the light.
This commit is contained in:
Matthias Clasen 2015-07-17 15:54:40 -04:00
parent 91b147622b
commit 8ba55d80fc

View File

@ -1158,8 +1158,7 @@ insert_theme (GtkIconTheme *icon_theme,
{ {
theme_file = g_key_file_new (); theme_file = g_key_file_new ();
g_key_file_set_list_separator (theme_file, ','); g_key_file_set_list_separator (theme_file, ',');
g_key_file_load_from_file (theme_file, path, 0, &error); if (!g_key_file_load_from_file (theme_file, path, 0, &error))
if (error)
{ {
g_key_file_free (theme_file); g_key_file_free (theme_file);
theme_file = NULL; theme_file = NULL;
@ -4098,7 +4097,7 @@ load_icon_thread (GTask *task,
{ {
GtkIconInfo *dup = task_data; GtkIconInfo *dup = task_data;
icon_info_ensure_scale_and_pixbuf (dup); (void)icon_info_ensure_scale_and_pixbuf (dup);
g_task_return_pointer (task, NULL, NULL); g_task_return_pointer (task, NULL, NULL);
} }