diff --git a/gui-lib/mred/private/wx/cocoa/filedialog.rkt b/gui-lib/mred/private/wx/cocoa/filedialog.rkt index f907a537..8380ce30 100644 --- a/gui-lib/mred/private/wx/cocoa/filedialog.rkt +++ b/gui-lib/mred/private/wx/cocoa/filedialog.rkt @@ -103,11 +103,12 @@ (begin0 (if (zero? result) #f - (if (memq 'multi style) - (let ([urls (tell ns URLs)]) - (for/list ([i (in-range (tell #:type _NSUInteger urls count))]) - (nsurl->string (tell urls objectAtIndex: #:type _NSUInteger i)))) - (let ([url (tell ns URL)]) - (nsurl->string url)))) + (atomically + (if (memq 'multi style) + (let ([urls (tell ns URLs)]) + (for/list ([i (in-range (tell #:type _NSUInteger urls count))]) + (nsurl->string (tell urls objectAtIndex: #:type _NSUInteger i)))) + (let ([url (tell ns URL)]) + (nsurl->string url))))) (release ns)))))