summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehan <jehan@girinstud.io>2013-11-18 00:55:54 +1300
committerMatthias Clasen <mclasen@redhat.com>2013-11-22 22:19:58 -0500
commitc988a258cc73d225ccd98a478da99963ec604cfa (patch)
treed42eb63f59464a498b6b57874323e40379d2c796
parente09719b12d034568bbb50b7e6aaff78138d6b58c (diff)
downloadgtk+-c988a258cc73d225ccd98a478da99963ec604cfa.tar.gz
Themes with specified gap images but no actual file crash.
https://bugzilla.gnome.org/show_bug.cgi?id=712536
-rw-r--r--modules/engines/pixbuf/pixbuf-rc-style.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/engines/pixbuf/pixbuf-rc-style.c b/modules/engines/pixbuf/pixbuf-rc-style.c
index 35970872a2..46470c215d 100644
--- a/modules/engines/pixbuf/pixbuf-rc-style.c
+++ b/modules/engines/pixbuf/pixbuf-rc-style.c
@@ -807,6 +807,27 @@ theme_parse_image(GtkSettings *settings,
data->overlay = NULL;
}
+ if (data->gap && !data->gap->filename)
+ {
+ g_scanner_warn (scanner, "Gap image options specified without filename");
+ theme_pixbuf_destroy (data->gap);
+ data->gap = NULL;
+ }
+
+ if (data->gap_start && !data->gap_start->filename)
+ {
+ g_scanner_warn (scanner, "Gap start image options specified without filename");
+ theme_pixbuf_destroy (data->gap_start);
+ data->gap_start = NULL;
+ }
+
+ if (data->gap_end && !data->gap_end->filename)
+ {
+ g_scanner_warn (scanner, "Gap end image options specified without filename");
+ theme_pixbuf_destroy (data->gap_end);
+ data->gap_end = NULL;
+ }
+
if (token != G_TOKEN_RIGHT_CURLY)
{
/* error - cleanup for exit */