diff options
author | Monsta <[email protected]> | 2015-01-05 17:44:21 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2015-01-10 18:03:50 +0100 |
commit | c863b05d1a9eb6b174603e84c4b3864b9048ca81 (patch) | |
tree | ecb5ae8fbd038e935b85722417722d138b147e2d | |
parent | b474b31308b269d60721b650fd0e34a7fa2743da (diff) | |
download | caja-c863b05d1a9eb6b174603e84c4b3864b9048ca81.tar.bz2 caja-c863b05d1a9eb6b174603e84c4b3864b9048ca81.tar.xz |
some NULL pointer checks
-rw-r--r-- | src/caja-bookmark-list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/caja-bookmark-list.c b/src/caja-bookmark-list.c index 65feedbe..1e7d5c1d 100644 --- a/src/caja-bookmark-list.c +++ b/src/caja-bookmark-list.c @@ -335,6 +335,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 +368,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); |