diff options
Diffstat (limited to 'src/caja-bookmark-list.c')
-rw-r--r-- | src/caja-bookmark-list.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/caja-bookmark-list.c b/src/caja-bookmark-list.c index 8ea12d41..c0976396 100644 --- a/src/caja-bookmark-list.c +++ b/src/caja-bookmark-list.c @@ -35,8 +35,6 @@ #include <gio/gio.h> #include <string.h> -#include "glibcompat.h" /* for g_list_free_full */ - #define MAX_BOOKMARK_LENGTH 80 #define LOAD_JOB 1 #define SAVE_JOB 2 @@ -47,7 +45,7 @@ enum LAST_SIGNAL }; -static guint signals[LAST_SIGNAL]; +static guint signals[LAST_SIGNAL] = { 0 }; static char *window_geometry; static CajaBookmarkList *singleton = NULL; @@ -335,6 +333,8 @@ caja_bookmark_list_delete_item_at (CajaBookmarkList *bookmarks, g_return_if_fail (index < g_list_length (bookmarks->list)); doomed = g_list_nth (bookmarks->list, index); + g_return_if_fail (doomed != NULL); + bookmarks->list = g_list_remove_link (bookmarks->list, doomed); g_assert (CAJA_IS_BOOKMARK (doomed->data)); @@ -366,6 +366,8 @@ caja_bookmark_list_move_item (CajaBookmarkList *bookmarks, } bookmark_item = g_list_nth (bookmarks->list, index); + g_return_if_fail (bookmark_item != NULL); + bookmarks->list = g_list_remove_link (bookmarks->list, bookmark_item); |