summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJehan <jehan@girinstud.io>2013-11-18 00:56:44 +1300
committerMatthias Clasen <mclasen@redhat.com>2013-11-22 22:17:07 -0500
commit0d396abf22f09ae36fa89aa109589a1a726079d7 (patch)
treed3e786ba98cb9dbfd8bb17aa02d1b9db859a4244 /modules
parenta53a931755111446eb7b94394034bbad1c341dc1 (diff)
downloadgtk+-0d396abf22f09ae36fa89aa109589a1a726079d7.tar.gz
Themes with specified gap images but no actual file crash.
https://bugzilla.gnome.org/show_bug.cgi?id=712536
Diffstat (limited to 'modules')
-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 db1830fd61..1d7972ac5e 100644
--- a/modules/engines/pixbuf/pixbuf-rc-style.c
+++ b/modules/engines/pixbuf/pixbuf-rc-style.c
@@ -769,6 +769,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 */