mirror of
https://github.com/jtheoof/swappy.git
synced 2024-08-16 18:20:45 +03:00
fix(init): fix segfault for unknown flags
Swappy segfaults if it is invoked with unknown command-line flags
This commit is contained in:
parent
196f7f4dea
commit
f4e9a19407
14
src/config.c
14
src/config.c
@ -184,9 +184,11 @@ void config_load(struct swappy_state *state) {
|
||||
}
|
||||
|
||||
void config_free(struct swappy_state *state) {
|
||||
g_free(state->config->config_file);
|
||||
g_free(state->config->save_dir);
|
||||
g_free(state->config->text_font);
|
||||
g_free(state->config);
|
||||
state->config = NULL;
|
||||
}
|
||||
if (state->config) {
|
||||
g_free(state->config->config_file);
|
||||
g_free(state->config->save_dir);
|
||||
g_free(state->config->text_font);
|
||||
g_free(state->config);
|
||||
state->config = NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user