#QUALITY by sr
authorsr
Tue, 10 May 2016 15:08:55 +0200
changeset 7359 dfee1b97dc3b
parent 7358 f13be4e055c6
child 7360 6629a4f605c4
#QUALITY by sr class: GradientBackground changed: #asFormOn: care for form allocation failure
GradientBackground.st
--- a/GradientBackground.st	Tue May 10 15:08:19 2016 +0200
+++ b/GradientBackground.st	Tue May 10 15:08:55 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2009 by eXept Software AG
               All Rights Reserved
@@ -389,6 +391,7 @@
             w := len ? (aDevice width).  "/ aView width.
         ].
         cachedForm := Form width:w height:h depth:aDevice depth onDevice:aDevice.
+        cachedForm isNil ifTrue:[^nil].
         "/ cachedForm clear.
         self fillRectangleX:0 y:0 width:w height:h in:cachedForm
     ].