MenuPanel.st
changeset 5246 3f2b38bf17ba
parent 5239 d6741794b7a6
child 5247 90655676e59b
child 5248 b869436ed677
--- a/MenuPanel.st	Tue Sep 13 16:50:00 2016 +0200
+++ b/MenuPanel.st	Tue Sep 13 17:41:57 2016 +0200
@@ -861,12 +861,10 @@
         ^ anImage
     ].
 
-    Images isNil ifTrue:[ Images := WeakIdentityDictionary new ].
-
-    (deviceImages := Images at:aDevice ifAbsent:nil) isNil ifTrue:[
-        Images at:aDevice put:(deviceImages := Dictionary new)
-    ].
-
+    Images isNil ifTrue:[ 
+        Images := WeakIdentityDictionary new.
+    ].
+    deviceImages := Images at:aDevice ifAbsentPut:[Dictionary new].
     ^ deviceImages at:anImage ifAbsentPut:[anImage copy onDevice:aDevice].
 !