ephoto: avoid segfault when no config
SVN revision: 60882
This commit is contained in:
parent
d0cc5e7849
commit
428a5c50a4
|
@ -112,7 +112,7 @@ _ephoto_config_load(Ephoto *ephoto)
|
||||||
ephoto->config = eet_data_read(ef, edd, "config");
|
ephoto->config = eet_data_read(ef, edd, "config");
|
||||||
eet_close(ef);
|
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_free(ephoto);
|
||||||
ephoto->config = calloc(1, sizeof(Ephoto_Config));
|
ephoto->config = calloc(1, sizeof(Ephoto_Config));
|
||||||
|
|
Loading…
Reference in New Issue