aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen 'Okra' Houston <smhouston88@gmail.com>2017-05-10 14:03:48 -0500
committerStephen 'Okra' Houston <smhouston88@gmail.com>2017-05-10 14:03:48 -0500
commit1265151a8324398555ade623c5008cc4db9408e5 (patch)
tree81d763866067dabec82469ad79eca3c8c29ae0fd
parentEphoto: Implement open/closed folder icon changing and clean up some fdo icons. (diff)
downloadephoto-1265151a8324398555ade623c5008cc4db9408e5.tar.gz
Ephoto: Check that a path exists before running file_file_get on it.
-rw-r--r--src/bin/ephoto_single_browser.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 8fe06f2..5faa42f 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -1598,9 +1598,12 @@ _ephoto_single_browser_recalc(Ephoto_Single_Browser *sb)
}
if (sb->entry)
{
- const char *bname = ecore_file_file_get(sb->entry->path);
+ const char *bname = NULL;
- sb->viewer = _viewer_add(sb->main, sb->entry->path, sb);
+ if (ecore_file_exists(sb->entry->path))
+ bname = ecore_file_file_get(sb->entry->path);
+ if (bname)
+ sb->viewer = _viewer_add(sb->main, sb->entry->path, sb);
if (sb->viewer)
{
elm_object_part_content_set(sb->mhbox, "left", sb->viewer);