diff options
author | Manuel 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) |
commit | 95ed3f75deb5c9b69c04d3433a521728686a8f73 (patch) | |
tree | a23fe7a3cb52487c57f9bc679d176a49a28ecf83 | |
parent | 5ec58d240ab99e3268f85ba31c1ed0ee99f78260 (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-x | clock.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) |