Move out test outside the loop.
authorLaurent Monin <geeqie@norz.org>
Sun, 20 Jul 2008 07:52:16 +0000 (07:52 +0000)
committerLaurent Monin <geeqie@norz.org>
Sun, 20 Jul 2008 07:52:16 +0000 (07:52 +0000)
src/bar_exif.c

index bb47cd0..e4e6179 100644 (file)
@@ -150,10 +150,12 @@ static gint bar_exif_row_enabled(const gchar *name)
 {
        GList *list;
 
+       if (!name) return FALSE;
+
        list = history_list_get_by_key("exif_extras");
        while (list)
                {
-               if (name && strcmp(name, (gchar *)(list->data)) == 0) return TRUE;
+               if (strcmp(name, (gchar *)(list->data)) == 0) return TRUE;
                list = list->next;
        }