1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fixed GLib assertion error when no theme file loaded

This commit is contained in:
James Booth 2012-11-27 00:44:05 +00:00
parent 828cc8b0c0
commit c3148eb95a

View File

@ -136,7 +136,9 @@ theme_change(const char * const theme_name)
// load from theme file // load from theme file
} else { } else {
if (theme_loc != NULL) {
g_string_free(theme_loc, TRUE); g_string_free(theme_loc, TRUE);
}
theme_loc = new_theme_file; theme_loc = new_theme_file;
log_info("Changing theme to \"%s\"", theme_name); log_info("Changing theme to \"%s\"", theme_name);
g_key_file_free(theme); g_key_file_free(theme);
@ -153,7 +155,9 @@ void
theme_close(void) theme_close(void)
{ {
g_key_file_free(theme); g_key_file_free(theme);
if (theme_loc != NULL) {
g_string_free(theme_loc, TRUE); g_string_free(theme_loc, TRUE);
}
} }
void void