From 95ed3f75deb5c9b69c04d3433a521728686a8f73 Mon Sep 17 00:00:00 2001 From: Manuel QuiƱones Date: Fri, 15 Feb 2013 13:30:33 +0000 Subject: Fix traceback when the resize callback is called and no gdk window is yet set - SL #1959 Signed-off-by: Manuel QuiƱones --- 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) -- cgit v0.9.1