Skip to content

Commit

Permalink
nemo-search-engine-advanced.c: Ensure a path before using it as a
Browse files Browse the repository at this point in the history
key in the skip table - g_str_hash cannot be NULL.

Fixes #2853
  • Loading branch information
mtwebster committed Oct 28, 2021
1 parent 9fa692c commit 287075b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions libnemo-private/nemo-search-engine-advanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,9 +1032,13 @@ search_thread_func (gpointer user_data)
(dir = g_queue_pop_head (data->directories)) != NULL) {

if (!toplevel) {
if (g_hash_table_contains (data->skip_folders, g_file_peek_path (dir))) {
g_object_unref (dir);
continue;
const gchar *path = g_file_peek_path (dir);

if (path != NULL) {
if (g_hash_table_contains (data->skip_folders, path)) {
g_object_unref (dir);
continue;
}
}

g_autofree gchar *filename = NULL;
Expand Down

0 comments on commit 287075b

Please sign in to comment.