[gtk/builder-tool-fixes: 2/2] buildertool: Be more robust




commit 6d24a2c942408b98e678d7c1b559de613af3d50c
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 13 14:19:12 2021 -0500

    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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]