Commit 4906bd0f authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Fix another Coverity bug

parent 5585ce9e
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)
......
......@@ -255,7 +255,10 @@ get_xkb (GdkKeymapX11 *keymap_x11)
{
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);
......
......@@ -987,11 +987,12 @@ insert_theme (GtkIconTheme *icon_theme, const char *theme_name)
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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment