]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/gnome2-console/callbacks.c
- Modify the depend section of each Makefile.in to reference
[bacula/bacula] / bacula / src / gnome2-console / callbacks.c
index 0de9987a6eb3e802adc6c6a8cbe94b7b9a684ec8..8d6c187839d760ac7bfbdb70cf931b4ab9b27699 100644 (file)
@@ -153,21 +153,33 @@ on_entry1_key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer user_d
       gtk_entry_set_text((GtkEntry *)entry1, "");
    } else if (event->keyval == KEY_Up) {
       if (!hc) {
+        if (!hist) {
+           return FALSE;
+        }
         hc = g_list_last(hist);
       } else {
         hc = g_list_previous(hc);
       }
       if (!hc) {
+        if (!hist) {
+           return FALSE;
+        }
         hc = g_list_first(hist);
       }
       gtk_entry_set_text((GtkEntry *)entry1, (gchar *)hc->data);
    } else if (event->keyval == KEY_Down) {
       if (!hc) {
+        if (!hist) {
+           return FALSE;
+        }
         hc = g_list_first(hist);
       } else {
         hc = g_list_next(hc);
       }
       if (!hc) {
+        if (!hist) {
+           return FALSE;
+        }
         hc = g_list_last(hist);
       }
       gtk_entry_set_text((GtkEntry *)entry1, (gchar *)hc->data);