[gtk/builder-tool-fixes: 2/2] buildertool: Be more robust
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/builder-tool-fixes: 2/2] buildertool: Be more robust
- Date: Mon, 13 Dec 2021 21:14:49 +0000 (UTC)
commit 66d8631c23cbc05d9937b503986d44c5eb1a480b
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 13 15:08:35 2021 -0500
buildertool: Be more robust
Don't pass a NULL string to gtk_builder_value_from_string.
tools/gtk-builder-tool-simplify.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/tools/gtk-builder-tool-simplify.c b/tools/gtk-builder-tool-simplify.c
index 635b6332fa..7aadefa160 100644
--- a/tools/gtk-builder-tool-simplify.c
+++ b/tools/gtk-builder-tool-simplify.c
@@ -432,6 +432,9 @@ value_is_default (Element *element,
if (g_type_is_a (G_PARAM_SPEC_VALUE_TYPE (pspec), G_TYPE_BOXED))
return FALSE;
+ if (!value_string)
+ return FALSE;
+
if (!gtk_builder_value_from_string (data->builder, pspec, value_string, &value, &error))
{
g_printerr (_("%s:%d: Couldn’t parse value for property '%s': %s\n"), data->input_filename,
element->line_number, pspec->name, error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]