From 428a5c50a4bf7ebb06c26815f67875275f7a17eb Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Thu, 30 Jun 2011 19:24:33 +0000 Subject: [PATCH] ephoto: avoid segfault when no config SVN revision: 60882 --- src/bin/ephoto_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c index 3ea7736..acc1a99 100644 --- a/src/bin/ephoto_config.c +++ b/src/bin/ephoto_config.c @@ -112,7 +112,7 @@ _ephoto_config_load(Ephoto *ephoto) ephoto->config = eet_data_read(ef, edd, "config"); eet_close(ef); - if (ephoto->config->config_version > CONFIG_VERSION) + if (!ephoto->config || ephoto->config->config_version > CONFIG_VERSION) { ephoto_config_free(ephoto); ephoto->config = calloc(1, sizeof(Ephoto_Config));