ephoto: avoid segfault when no config

SVN revision: 60882
This commit is contained in:
Boris Faure 2011-06-30 19:24:33 +00:00
parent d0cc5e7849
commit 428a5c50a4
1 changed files with 1 additions and 1 deletions

View File

@ -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));