[gtk+] cssprovider: Explode if we fail to parse the default CSS



commit 1b64655eb6d600e8b90c68cb77dcc00d3535862a
Author: Benjamin Otte <otte redhat com>
Date:   Wed Dec 15 14:25:19 2010 +0100

    cssprovider: Explode if we fail to parse the default CSS
    
    This can only happen if somebody really messed up with a checkin, and in
    that case we want to explode early.

 gtk/gtkcssprovider.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 4696fcf..1ea5ed9 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -3824,7 +3824,10 @@ gtk_css_provider_get_default (void)
         "\n";
 
       provider = gtk_css_provider_new ();
-      gtk_css_provider_load_from_data (provider, str, -1, NULL);
+      if (!gtk_css_provider_load_from_data (provider, str, -1, NULL))
+        {
+          g_error ("Failed to load the internal default CSS.");
+        }
     }
 
   return provider;



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