diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 7e555fb36..cb12da259 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -4570,7 +4570,7 @@ - (void)end_transfer_with_error:(NSError*)err { Block_release(completion_handler); completion_handler = nil; } - [file_promise_providers removeObject:self]; + if (file_promise_providers) [file_promise_providers removeObject:self]; if (drag_finish_window_id) { if (!file_promise_providers || [file_promise_providers count] == 0) { fire_drag_finished();