From 6d24a2c942408b98e678d7c1b559de613af3d50c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 13 Dec 2021 14:19:12 -0500 Subject: [PATCH] buildertool: Be more robust A lot of crashes in simplify can be avoided if get_class_name does not return NULL. --- tools/gtk-builder-tool-simplify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/gtk-builder-tool-simplify.c b/tools/gtk-builder-tool-simplify.c index 404a38b2d7..bb8e1ebd62 100644 --- a/tools/gtk-builder-tool-simplify.c +++ b/tools/gtk-builder-tool-simplify.c @@ -486,7 +486,7 @@ get_attribute_value (Element *element, return element->attribute_values[i]; } - return NULL; + return ""; } static void @@ -549,7 +549,7 @@ get_class_name (Element *element) return get_attribute_value (parent, "class"); } - return NULL; + return ""; } static gboolean