changeset 997:c74c4e87a682

Fixed calling "Image search" function in a directory without image.
author bruclik
date Tue, 26 Aug 2008 13:56:56 +0000
parents 4794cf5ecd8e
children d2701a5864c5
files src/search.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/search.c	Mon Aug 25 22:45:38 2008 +0000
+++ b/src/search.c	Tue Aug 26 13:56:56 2008 +0000
@@ -2564,7 +2564,7 @@
 	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;