summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-desktop-directory.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-07-15 17:13:26 -0400
committerlukefromdc <[email protected]>2018-07-15 17:13:26 -0400
commit5b20286752e0e923b1ce6298cdcf21e62849ad7e (patch)
tree8bd0c908747be12024a637968ffd362c96c20a06 /libcaja-private/caja-desktop-directory.c
parenta2fa06f9d11a6cc93ea999dc100a3e57bc5762d0 (diff)
downloadcaja-5b20286752e0e923b1ce6298cdcf21e62849ad7e.tar.bz2
caja-5b20286752e0e923b1ce6298cdcf21e62849ad7e.tar.xz
caja-desktop-directory: stop segfaults in directory_ready_callback
Prevent segfault on g_list_find in directory_ready_callback by catching the NULL case
Diffstat (limited to 'libcaja-private/caja-desktop-directory.c')
-rw-r--r--libcaja-private/caja-desktop-directory.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcaja-private/caja-desktop-directory.c b/libcaja-private/caja-desktop-directory.c
index de998cd2..5ec63864 100644
--- a/libcaja-private/caja-desktop-directory.c
+++ b/libcaja-private/caja-desktop-directory.c
@@ -162,6 +162,10 @@ directory_ready_callback (CajaDirectory *directory,
g_assert (callback_data != NULL);
merged_callback = callback_data;
+ /*Prevent segfaults on the assert with GTK 3.23*/
+ if (merged_callback->non_ready_directories == NULL)
+ return;
+
g_assert (g_list_find (merged_callback->non_ready_directories, directory) != NULL);
/* Update based on this call. */