Oops, fixed CairoGraphicsContext>>width:height:
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 05 Apr 2016 08:02:32 +0100
changeset 76 f3deda9cea3e
parent 75 e3ca2f982493
child 77 cdf856e78998
Oops, fixed CairoGraphicsContext>>width:height: Must test whether a Cairo context has been created. If not, we're done.
CairoGraphicsContext.st
--- a/CairoGraphicsContext.st	Tue Apr 05 07:44:27 2016 +0100
+++ b/CairoGraphicsContext.st	Tue Apr 05 08:02:32 2016 +0100
@@ -267,10 +267,12 @@
 !
 
 width: width height: height
-    device isX11Platform ifTrue:[ 
-        cr surface width: width height: height 
-    ] ifFalse:[ 
-        self destroyCR.
+    cr notNil ifTrue:[
+        device isX11Platform ifTrue:[ 
+            cr surface width: width height: height 
+        ] ifFalse:[ 
+            self destroyCR.
+        ].
     ].
 
     "Created: / 02-04-2016 / 15:37:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"