summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 59e4328a6fc..dccee159254 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -394,7 +394,10 @@ xg_get_image_for_pixmap (struct frame *f,
certain themes. */
#ifdef USE_CAIRO
- surface = img->cr_data;
+ if (cairo_pattern_get_type (img->cr_data) == CAIRO_PATTERN_TYPE_SURFACE)
+ cairo_pattern_get_surface (img->cr_data, &surface);
+ else
+ surface = NULL;
if (surface)
{