diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 594e8d061..e58458483 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -4659,7 +4659,7 @@ _glfwPlatformStartDrag(_GLFWwindow* window, const GLFWimage* thumbnail) {@autore NSString* extension = @"data"; if (mimeType) { UTType *type = [UTType typeWithMIMEType:@(mimeType)]; - extension = type.preferredFilenameExtension; + if (type) extension = type.preferredFilenameExtension; } return [NSString stringWithFormat:@"kitty-drag-source-%@.%@", [[NSUUID UUID] UUIDString], extension]; }