Fixed calling "Image search" function in a directory without image.
authorPetr Ostadal <postadal@suse.cz>
Tue, 26 Aug 2008 13:56:56 +0000 (13:56 +0000)
committerPetr Ostadal <postadal@suse.cz>
Tue, 26 Aug 2008 13:56:56 +0000 (13:56 +0000)
src/search.c

index b52fff5..38862d9 100644 (file)
@@ -2564,7 +2564,7 @@ void search_new(FileData *dir_fd, FileData *example_file)
        sd->match_keywords_enable = FALSE;
 
        sd->search_similarity = 95;
-       sd->search_similarity_path = g_strdup(example_file->path);
+       sd->search_similarity_path = example_file ? g_strdup(example_file->path) : NULL;
        sd->search_similarity_cd = NULL;
 
        sd->search_idle_id = -1;