[gtk+/gtk-2-24] Bug 712536 - Themes with gap_(start|end)_file but no actual file crash



commit aa8704aa9f5b1c1c47395cd4ff392e8158f0af05
Author: Jehan <jehan girinstud io>
Date:   Sat Nov 23 18:35:18 2013 +1300

    Bug 712536 - Themes with gap_(start|end)_file but no actual file crash
    
    Code factorization in commit 34fd123 reintroduced bug fixed in 0d396ab
    with non-equivalent factorized tests.

 modules/engines/pixbuf/pixbuf-rc-style.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/modules/engines/pixbuf/pixbuf-rc-style.c b/modules/engines/pixbuf/pixbuf-rc-style.c
index a3443d2..4b86e4f 100644
--- a/modules/engines/pixbuf/pixbuf-rc-style.c
+++ b/modules/engines/pixbuf/pixbuf-rc-style.c
@@ -804,16 +804,13 @@ theme_parse_image(GtkSettings  *settings,
     clear_theme_pixbuf_and_warn (&data->overlay, scanner, "Overlay image options specified without 
filename");
 
   if (data->gap && !data->gap->filename)
-    {
-      if (data->gap)
-        clear_theme_pixbuf_and_warn (&data->gap, scanner, "Gap image options specified without filename");
+    clear_theme_pixbuf_and_warn (&data->gap, scanner, "Gap image options specified without filename");
 
-      if (data->gap_start)
-        clear_theme_pixbuf_and_warn (&data->gap_start, scanner, "Gap start image options specified without 
filename");
+  if (data->gap_start && !data->gap_start->filename)
+    clear_theme_pixbuf_and_warn (&data->gap_start, scanner, "Gap start image options specified without 
filename");
 
-      if (data->gap_end)
-        clear_theme_pixbuf_and_warn (&data->gap_end, scanner, "Gap end image options specified without 
filename");
-    }
+  if (data->gap_end && !data->gap_end->filename)
+    clear_theme_pixbuf_and_warn (&data->gap_end, scanner, "Gap end image options specified without 
filename");
 
   if (token != G_TOKEN_RIGHT_CURLY)
     {


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