diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2013-09-15 08:53:51 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2013-09-15 08:54:44 +0300 |
commit | 383b9773c07966d90b4e36d6281bc6f25f2dcab7 (patch) | |
tree | 1d1b841d6a53eecfb864e1129f9df5fa5dfeac7d /src/xfdesktop-file-utils.c | |
parent | f4d8e496b996094e9ef016817262994e7cf1ae99 (diff) | |
download | xfdesktop-383b9773c07966d90b4e36d6281bc6f25f2dcab7.tar.gz |
Avoid calling g_object_ref on NULL
Diffstat (limited to 'src/xfdesktop-file-utils.c')
-rw-r--r-- | src/xfdesktop-file-utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xfdesktop-file-utils.c b/src/xfdesktop-file-utils.c index 23e5dc33..facc3741 100644 --- a/src/xfdesktop-file-utils.c +++ b/src/xfdesktop-file-utils.c @@ -377,7 +377,8 @@ xfdesktop_file_utils_file_icon_list_to_file_list(GList *icon_list) for(l = icon_list; l; l = l->next) { icon = XFDESKTOP_FILE_ICON(l->data); file = xfdesktop_file_icon_peek_file(icon); - file_list = g_list_prepend(file_list, g_object_ref(file)); + if(file) + file_list = g_list_prepend(file_list, g_object_ref(file)); } return g_list_reverse(file_list); |