Explorar o código

Small bugfix in Cairo test.

Taddeus Kroes %!s(int64=13) %!d(string=hai) anos
pai
achega
08b630b084
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      tests/cairotest.py

+ 3 - 1
tests/cairotest.py

@@ -103,7 +103,9 @@ def create_context_window(w, h, callback):
 
 
 
 
 def draw(*args):
 def draw(*args):
-    print 'draw'
+    if not cr:
+        return
+
     # Background
     # Background
     cr.rectangle(0, 0, *root.get_size())
     cr.rectangle(0, 0, *root.get_size())
     cr.set_source_rgb(0, 1, 0)
     cr.set_source_rgb(0, 1, 0)