diff --git a/collects/mrlib/image-core.ss b/collects/mrlib/image-core.ss index 875bc9a7..d216c6df 100644 --- a/collects/mrlib/image-core.ss +++ b/collects/mrlib/image-core.ss @@ -629,18 +629,20 @@ the mask bitmap and the original bitmap are all together in a single bytes! [scale-w (ceiling (inexact->exact (* x-scale (send orig-bm get-width))))] [scale-h (ceiling (inexact->exact (* y-scale (send orig-bm get-height))))] [new-bm (make-object bitmap% scale-w scale-h)] - [new-mask (make-object bitmap% scale-w scale-h)]) - (send new-bm set-loaded-mask new-mask) + [new-mask (and orig-mask (make-object bitmap% scale-w scale-h))]) + (when new-mask + (send new-bm set-loaded-mask new-mask)) (send bdc set-bitmap new-bm) (send bdc set-scale x-scale y-scale) (send bdc clear) (send bdc draw-bitmap orig-bm 0 0) - (send bdc set-bitmap new-mask) - (send bdc set-scale x-scale y-scale) - (send bdc clear) - (send bdc draw-bitmap orig-mask 0 0) + (when new-mask + (send bdc set-bitmap new-mask) + (send bdc set-scale x-scale y-scale) + (send bdc clear) + (send bdc draw-bitmap orig-mask 0 0)) (send bdc set-bitmap #f)