diff options
author | James Booth <boothj5@gmail.com> | 2012-11-27 00:44:05 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-11-27 00:44:05 +0000 |
commit | c3148eb95a2c9c3072bacd2d4544cad2380ea7e3 (patch) | |
tree | 305744c9701242c675f6aadf8b3bca1120395a03 | |
parent | 828cc8b0c033956fdb4c370dac194dea7145b9ca (diff) | |
download | profani-tty-c3148eb95a2c9c3072bacd2d4544cad2380ea7e3.tar.gz |
Fixed GLib assertion error when no theme file loaded
-rw-r--r-- | src/theme.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/theme.c b/src/theme.c index e149bc87..aeb5a70f 100644 --- a/src/theme.c +++ b/src/theme.c @@ -136,7 +136,9 @@ theme_change(const char * const theme_name) // load from theme file } else { - g_string_free(theme_loc, TRUE); + if (theme_loc != NULL) { + g_string_free(theme_loc, TRUE); + } theme_loc = new_theme_file; log_info("Changing theme to \"%s\"", theme_name); g_key_file_free(theme); @@ -153,7 +155,9 @@ void theme_close(void) { g_key_file_free(theme); - g_string_free(theme_loc, TRUE); + if (theme_loc != NULL) { + g_string_free(theme_loc, TRUE); + } } void |