Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2013-02-15 13:30:33 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2013-02-27 23:31:11 (GMT)
commit95ed3f75deb5c9b69c04d3433a521728686a8f73 (patch)
treea23fe7a3cb52487c57f9bc679d176a49a28ecf83
parent5ec58d240ab99e3268f85ba31c1ed0ee99f78260 (diff)
Fix traceback when the resize callback is called and no gdk window is yet set - SL #1959
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
-rwxr-xr-xclock.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/clock.py b/clock.py
index 12d0855..afdcc90 100755
--- a/clock.py
+++ b/clock.py
@@ -598,6 +598,11 @@ class ClockFace(gtk.DrawingArea):
the parameters which are important for our rendering (center
of the clock, radius).
"""
+ # This callback can be called when the gdk window is not yet
+ # set
+ if self.window is None:
+ return
+
# Store the measures of the clock face widget
self._center_x = int(allocation.width / 2.0)
self._center_y = int(allocation.height / 2.0)