From: Omari Stephens Date: Sun, 31 Jul 2022 21:35:32 +0000 (+0000) Subject: Whoops; make sure we check the return value of read_bool_option. X-Git-Tag: v2.0~3 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=97b941e24ec5fe6065b80e05f61554932f47c1b0 Whoops; make sure we check the return value of read_bool_option. --- diff --git a/src/rcfile.c b/src/rcfile.c index 66a1597d..3d64013a 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -545,7 +545,7 @@ static void write_color_profile(GString *outstr, gint indent) gint i; #ifndef HAVE_LCMS g_string_append_printf(outstr, "\n", GQ_APPNAME); + " color profile options will have no effect.\n-->\n", GQ_APPNAME); #endif WRITE_NL(); WRITE_STRING("\n"); WRITE_SEPARATOR(); @@ -761,12 +761,12 @@ gboolean save_default_layout_options_to_file(const gchar *utf8_path, ConfOptions outstr = g_string_new(""); g_string_append_printf(outstr, "\n"); WRITE_SEPARATOR(); @@ -1233,8 +1233,12 @@ static void class_filter_load_filter_type(const gchar **attribute_names, const g return; } - read_bool_option(enabled_name, "enabled", enabled_value, - &(options->class_filter[load_class_index]); + if (!read_bool_option(enabled_name, "enabled", enabled_value, + &(options->class_filter[load_class_index]) + { + log_printf("Failed to load config element with " + "class index %d\n", load_class_index); + } } static void options_parse_class_filter(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer UNUSED(data), GError **UNUSED(error))