Skip to content

Commit 5b20286

Browse files
committed
caja-desktop-directory: stop segfaults in directory_ready_callback
Prevent segfault on g_list_find in directory_ready_callback by catching the NULL case
1 parent a2fa06f commit 5b20286

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎libcaja-private/caja-desktop-directory.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ directory_ready_callback (CajaDirectory *directory,
162162
g_assert (callback_data != NULL);
163163

164164
merged_callback = callback_data;
165+
/*Prevent segfaults on the assert with GTK 3.23*/
166+
if (merged_callback->non_ready_directories == NULL)
167+
return;
168+
165169
g_assert (g_list_find (merged_callback->non_ready_directories, directory) != NULL);
166170

167171
/* Update based on this call. */

0 commit comments

Comments
 (0)