ephoto: avoid segfault when no config

SVN revision: 60882
v-1.6.0
Boris Faure 12 years ago
parent d0cc5e7849
commit 428a5c50a4
  1. 2
      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));

Loading…
Cancel
Save