[gtk/wip/baedert/for-master: 50/54] rendernodeparser: Only report a GError* if we have one



commit ecc40cf115ffbfde965ee961e577aecfd50d9ae7
Author: Timm Bäder <mail baedert org>
Date:   Tue Nov 19 09:37:26 2019 +0100

    rendernodeparser: Only report a GError* if we have one

 gsk/gskrendernodeparser.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 04a690935f..6a71db961f 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -126,11 +126,14 @@ parse_texture (GtkCssParser *parser,
 
   if (texture == NULL)
     {
-      gtk_css_parser_emit_error (parser,
-                                 &start_location,
-                                 gtk_css_parser_get_end_location (parser),
-                                 error);
-      g_clear_error (&error);
+      if (error)
+        {
+          gtk_css_parser_emit_error (parser,
+                                     &start_location,
+                                     gtk_css_parser_get_end_location (parser),
+                                     error);
+          g_clear_error (&error);
+        }
       return FALSE;
     }
 


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