From 8f1aa8481d32968b6755f69b27a55f2d3c4e027d Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 2 Dec 2021 08:51:32 +0100 Subject: [PATCH] [Config] when parsing -theme- cmd option, allow throwing errors. --- source/xrmoptions.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/source/xrmoptions.c b/source/xrmoptions.c index 65a724c3..6dff291f 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -560,15 +560,9 @@ void config_parse_cmd_options(void) { g_debug("theme: \"%s\"\n", str->str); if (rofi_theme_parse_string(str->str) == 1) { /** Failed to parse, try again as string. */ - rofi_clear_error_messages(); - g_string_assign(str, ""); - config_parser_form_rasi_format(str, &(tokens[2]), count - 2, - stored_argv[in + 1], TRUE); - g_debug("theme: \"%s\"\n", str->str); - if (rofi_theme_parse_string(str->str) == 1) { - /** Failed to parse, try again as string. */ - rofi_clear_error_messages(); - } + g_strfreev(tokens); + g_string_free(str, TRUE); + return; } g_string_free(str, TRUE); }