2006-04-12 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkicontheme.c (insert_theme): Handle dirs == NULL
+ gracefully. (Coverity)
+
* gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing
if the widget is not a child. (Coverity)
2006-04-12 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkicontheme.c (insert_theme): Handle dirs == NULL
+ gracefully. (Coverity)
+
* gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing
if the widget is not a child. (Coverity)
{
keymap_x11->xkb_desc = XkbGetMap (xdisplay, XkbKeySymsMask | XkbKeyTypesMask | XkbModifierMapMask | XkbVirtualModsMask, XkbUseCoreKbd);
if (keymap_x11->xkb_desc == NULL)
- g_error ("Failed to get keymap");
+ {
+ g_error ("Failed to get keymap");
+ return NULL;
+ }
XkbGetNames (xdisplay, XkbGroupNamesMask | XkbVirtualModNamesMask, keymap_x11->xkb_desc);
NULL);
theme->dirs = NULL;
- for (i = 0; dirs[i] != NULL; i++)
- theme_subdir_load (icon_theme, theme, theme_file, dirs[i]);
-
- g_strfreev (dirs);
-
+ if (dirs)
+ {
+ for (i = 0; dirs[i] != NULL; i++)
+ theme_subdir_load (icon_theme, theme, theme_file, dirs[i]);
+ g_strfreev (dirs);
+ }
theme->dirs = g_list_reverse (theme->dirs);
themes = g_key_file_get_string_list (theme_file,