#BUGFIX by Maren
class: Image
changed:
#postCopy
#setColorMap:
don't create Mappedpalettes for nil colormaps
--- a/Image.st Sun Feb 12 23:00:50 2017 +0100
+++ b/Image.st Mon Feb 13 18:23:09 2017 +0100
@@ -2948,7 +2948,7 @@
!
setColorMap:newColorMap
- newColorMap isColormap ifTrue:[
+ (newColorMap isColormap or:[newColorMap isNil]) ifTrue:[
colorMap := newColorMap.
] ifFalse:[
colorMap := MappedPalette withColors:newColorMap.
@@ -6846,10 +6846,12 @@
and clear out any device handles in the copy."
bytes := bytes copy.
- colorMap isColormap ifTrue:[
- colorMap := colorMap copy.
- ] ifFalse:[
- colorMap := MappedPalette withColors:colorMap.
+ colorMap notNil ifTrue:[
+ colorMap isColormap ifTrue:[
+ colorMap := colorMap copy.
+ ] ifFalse:[
+ colorMap := MappedPalette withColors:colorMap.
+ ].
].
device := deviceForm := monoDeviceForm := fullColorDeviceForm := nil.
mask := mask copy.