[gnome-panel/gtk3] clock: Check allocated size before creating the shadow pixbuf
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gtk3] clock: Check allocated size before creating the shadow pixbuf
- Date: Sun, 30 Jan 2011 10:53:11 +0000 (UTC)
commit d98b58770dec2f1434cb0acce487e85514ca9bb0
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Jan 30 11:51:37 2011 +0100
clock: Check allocated size before creating the shadow pixbuf
Fixes a runtime critical warning because it tried to create a 0 width
pixbuf.
applets/clock/clock-map.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/applets/clock/clock-map.c b/applets/clock/clock-map.c
index 24a1465..fe29010 100644
--- a/applets/clock/clock-map.c
+++ b/applets/clock/clock-map.c
@@ -588,7 +588,8 @@ clock_map_display (ClockMap *this)
{
ClockMapPrivate *priv = PRIVATE (this);
- clock_map_render_shadow (this);
+ if (priv->width > 0 || priv->height > 0)
+ clock_map_render_shadow (this);
gtk_widget_queue_draw (GTK_WIDGET (this));
time (&priv->last_refresh);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]