Skip to content

Commit 287075b

Browse files
committed
nemo-search-engine-advanced.c: Ensure a path before using it as a
key in the skip table - g_str_hash cannot be NULL. Fixes #2853
1 parent 9fa692c commit 287075b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

libnemo-private/nemo-search-engine-advanced.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -1032,9 +1032,13 @@ search_thread_func (gpointer user_data)
10321032
(dir = g_queue_pop_head (data->directories)) != NULL) {
10331033

10341034
if (!toplevel) {
1035-
if (g_hash_table_contains (data->skip_folders, g_file_peek_path (dir))) {
1036-
g_object_unref (dir);
1037-
continue;
1035+
const gchar *path = g_file_peek_path (dir);
1036+
1037+
if (path != NULL) {
1038+
if (g_hash_table_contains (data->skip_folders, path)) {
1039+
g_object_unref (dir);
1040+
continue;
1041+
}
10381042
}
10391043

10401044
g_autofree gchar *filename = NULL;

0 commit comments

Comments
 (0)