diff --git a/collects/slideshow/tool.ss b/collects/slideshow/tool.ss index 24a9904e35..610fafcdda 100644 --- a/collects/slideshow/tool.ss +++ b/collects/slideshow/tool.ss @@ -904,7 +904,14 @@ pict snip : (drscheme:language:add-snip-value ;; Convert to print? - (lambda (x) ((dynamic-require '(lib "mrpict.ss" "texpict") 'pict?) x)) + (lambda (x) + ;; if the require fails, then we cannot display the pict. + ;; this can happen when, for example, there is no mred module + ;; in the namespace + (let ([pict? (with-handlers ((exn? (λ (x) #f))) + (dynamic-require '(lib "mrpict.ss" "texpict") 'pict?))]) + (and pict? + (pict? x)))) ;; Converter: pict->image-snip ;; Namespace setup: