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:
parent
828cc8b0c0
commit
c3148eb95a
@ -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,8 +155,10 @@ 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
|
||||||
theme_init_colours(void)
|
theme_init_colours(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user