aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Poole <netstar@gmail.com>2017-12-18 20:35:23 +0000
committerAl Poole <netstar@gmail.com>2017-12-18 20:35:23 +0000
commit7714e3756b035c581094154938749355a08e2d03 (patch)
tree064059dc2113279fbea214a7f5d07cbee9e770bc
parentephoto: fix freebsd build. (diff)
downloadephoto-7714e3756b035c581094154938749355a08e2d03.tar.gz
ephoto_config: fix segv on start
-rw-r--r--src/bin/ephoto_config.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 5907a3d..f3b871d 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -764,10 +764,13 @@ ephoto_config_save(Ephoto *ephoto)
void
ephoto_config_free(Ephoto *ephoto)
{
- eina_stringshare_del(ephoto->config->directory);
- eina_stringshare_del(ephoto->config->slideshow_transition);
- free(ephoto->config);
- ephoto->config = NULL;
+ if (ephoto->config)
+ {
+ eina_stringshare_del(ephoto->config->directory);
+ eina_stringshare_del(ephoto->config->slideshow_transition);
+ free(ephoto->config);
+ ephoto->config = NULL;
+ }
}
Eina_Bool