diff options
author | Stefano Karapetsas <[email protected]> | 2014-01-23 10:14:57 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-01-23 10:14:57 +0100 |
commit | 0dd85b49acf5b6076a66288ab6f2bf856c34c38e (patch) | |
tree | c3b371db0ab546f6440c4dd31d88774f8b5ea176 /applets/clock | |
parent | 8e19630353062fcc458df29ea9767d703cfbbad7 (diff) | |
download | mate-panel-0dd85b49acf5b6076a66288ab6f2bf856c34c38e.tar.bz2 mate-panel-0dd85b49acf5b6076a66288ab6f2bf856c34c38e.tar.xz |
clock: Do not try to get width/height of non-existing GdkPixbuf
https://git.gnome.org/browse/gnome-panel/commit/applets/clock?id=4729df0cda021c27b76be072023dbee082e49e47
Diffstat (limited to 'applets/clock')
-rw-r--r-- | applets/clock/clock-map.c | 8 |
1 files 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); |