From 0dd85b49acf5b6076a66288ab6f2bf856c34c38e Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Thu, 23 Jan 2014 10:14:57 +0100 Subject: clock: Do not try to get width/height of non-existing GdkPixbuf https://git.gnome.org/browse/gnome-panel/commit/applets/clock?id=4729df0cda021c27b76be072023dbee082e49e47 --- applets/clock/clock-map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/applets/clock/clock-map.c b/applets/clock/clock-map.c index 5823f6ea..13032c54 100644 --- a/applets/clock/clock-map.c +++ b/applets/clock/clock-map.c @@ -252,10 +252,7 @@ clock_map_expose (GtkWidget *this, GdkEventExpose *event) #endif style = gtk_widget_get_style (this); -#if GTK_CHECK_VERSION (3, 0, 0) - width = gdk_pixbuf_get_width (priv->shadow_map_pixbuf); - height = gdk_pixbuf_get_height (priv->shadow_map_pixbuf); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) window = gtk_widget_get_window (this); gtk_widget_get_allocation (this, &allocation); #endif @@ -266,6 +263,9 @@ clock_map_expose (GtkWidget *this, GdkEventExpose *event) } #if GTK_CHECK_VERSION (3, 0, 0) + width = gdk_pixbuf_get_width (priv->shadow_map_pixbuf); + height = gdk_pixbuf_get_height (priv->shadow_map_pixbuf); + gdk_cairo_set_source_pixbuf (cr, priv->shadow_map_pixbuf, 0, 0); cairo_rectangle (cr, 0, 0, width, height); cairo_paint (cr); -- cgit v1.2.1