aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen 'Okra' Houston <smhouston88@gmail.com>2017-05-05 11:08:15 -0500
committerStephen 'Okra' Houston <smhouston88@gmail.com>2017-05-05 11:08:15 -0500
commit5759135ad3e064aa33899dd805ec17aad17c1697 (patch)
tree1af94ea519a2b3acd90262f4bd43deec9c3d88db
parentEphoto: make sure the monitor callback for delete is on the file we are worki... (diff)
downloadephoto-5759135ad3e064aa33899dd805ec17aad17c1697.tar.gz
Ephoto: Fix a potential crash when switching directories in single view.
-rw-r--r--src/bin/ephoto_single_browser.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 481eca3..282c753 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -2142,10 +2142,18 @@ ephoto_single_browser_entries_set(Evas_Object *obj, Eina_List *entries)
elm_image_file_get(v->image, &image, NULL);
dir = ecore_file_dir_get(image);
- if (strcmp(sb->ephoto->config->directory, dir))
- ephoto_single_browser_entry_set(sb->main,
+ if (!dir)
+ {
+ ephoto_single_browser_entry_set(sb->main,
_first_entry_find(sb));
- free(dir);
+ }
+ else
+ {
+ if (strcmp(sb->ephoto->config->directory, dir))
+ ephoto_single_browser_entry_set(sb->main,
+ _first_entry_find(sb));
+ free(dir);
+ }
}
else
ephoto_single_browser_entry_set(sb->main,