diff --git a/collects/racket/draw/private/bitmap.rkt b/collects/racket/draw/private/bitmap.rkt index 17cab15b7f..10deb3dc7d 100644 --- a/collects/racket/draw/private/bitmap.rkt +++ b/collects/racket/draw/private/bitmap.rkt @@ -302,7 +302,8 @@ (set!-values (s b&w?) (do-load-bitmap in kind bg complain-on-failure?)) (set! width (if s (cairo_image_surface_get_width s) 0)) (set! height (if s (cairo_image_surface_get_height s) 0)) - (set! shadow (make-bytes (* width height 4)))) + (set! shadow (make-bytes (* width height 4))) + (and s #t)) (define/private (do-load-bitmap in kind bg complain-on-failure?) (if (path-string? in) diff --git a/collects/tests/gracket/dc.rktl b/collects/tests/gracket/dc.rktl index 21da9ad3d1..fde2dc637b 100644 --- a/collects/tests/gracket/dc.rktl +++ b/collects/tests/gracket/dc.rktl @@ -620,4 +620,9 @@ ;; ---------------------------------------- +(let ([bm (make-object bitmap% 1 1)]) + (test #t 'load-file (send bm load-file (collection-file-path "sk.jpg" "icons")))) + +;; ---------------------------------------- + (report-errs)