diff --git a/collects/mred/private/wx/cocoa/canvas.rkt b/collects/mred/private/wx/cocoa/canvas.rkt index d8461e1f7d..c7c6989bce 100644 --- a/collects/mred/private/wx/cocoa/canvas.rkt +++ b/collects/mred/private/wx/cocoa/canvas.rkt @@ -371,7 +371,7 @@ (tell (tell (if is-combo? RacketComboBox RacketView) alloc) initWithFrame: #:type _NSRect r) - (let* ([share-context (send gl-config get-share-context)] + (let* ([share-context (and gl-config (send gl-config get-share-context))] [context-handle (and share-context (send share-context get-handle))] [pf (gl-config->pixel-format gl-config)] [new-context (and diff --git a/collects/mred/private/wx/gtk/gl-context.rkt b/collects/mred/private/wx/gtk/gl-context.rkt index 32d222a901..d2ee30c68b 100644 --- a/collects/mred/private/wx/gtk/gl-context.rkt +++ b/collects/mred/private/wx/gtk/gl-context.rkt @@ -148,7 +148,7 @@ (define (prepare-widget-gl-context gtk config) (init!) - (let ([share-context (send config get-share-context)] + (let ([share-context (and config (send config get-share-context))] [config (config->GdkGLConfig #f ; (gtk_widget_get_screen gtk) (or config (new gl-config%))