ImageEditor.st
changeset 2449 5ef668d71314
parent 2447 017ac2e500f7
child 2520 8ee06c8f3f9f
--- a/ImageEditor.st	Wed Dec 17 14:41:27 2008 +0100
+++ b/ImageEditor.st	Thu Dec 18 01:06:46 2008 +0100
@@ -4990,9 +4990,10 @@
     ].
     clrIndex := self selectionOfColor value.
     self hasMask "img mask notNil" ifTrue: [ 
-        clrIndex == 1 ifTrue:[^ nil].
-        clrIndex == 0 ifTrue:[^ nil].
-        ^ clrIndex - 1 
+        (clrIndex isInteger and:[clrIndex > 1]) ifTrue:[
+            ^ clrIndex - 1 
+        ].
+        ^ nil
     ].
     ^ clrIndex
 !