aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2015-12-03 16:16:30 +0200
committerJussi Kukkonen <jussi.kukkonen@intel.com>2016-04-25 13:57:54 +0300
commite70994e3293f78e407ca1d04bb7a9d2eab8e6e27 (patch)
treea8d049602c86755904872e74442b8e052bc5bfa2
parent87654d05f20ec08cbca3fd61fba539516d031aa4 (diff)
downloadmatchbox-panel-2-e70994e3293f78e407ca1d04bb7a9d2eab8e6e27.tar.gz
matchbox-panel-2-e70994e3293f78e407ca1d04bb7a9d2eab8e6e27.tar.bz2
matchbox-panel-2-e70994e3293f78e407ca1d04bb7a9d2eab8e6e27.zip
Fix a crash on startup
-rw-r--r--matchbox-panel/mb-panel-scaling-image2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/matchbox-panel/mb-panel-scaling-image2.c b/matchbox-panel/mb-panel-scaling-image2.c
index 5692ce1..8cdc3a1 100644
--- a/matchbox-panel/mb-panel-scaling-image2.c
+++ b/matchbox-panel/mb-panel-scaling-image2.c
@@ -327,8 +327,10 @@ mb_panel_scaling_image2_draw (GtkWidget *widget, cairo_t *cr)
{
MBPanelScalingImage2 *image = MB_PANEL_SCALING_IMAGE2 (widget);
- gdk_cairo_set_source_pixbuf (cr, image->priv->pixbuf, 0.0, 0.0);
- cairo_paint (cr);
+ if (image->priv->pixbuf) {
+ gdk_cairo_set_source_pixbuf (cr, image->priv->pixbuf, 0.0, 0.0);
+ cairo_paint (cr);
+ }
return TRUE;
}