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