diff --git a/src/slic3r/Utils/MacDarkMode.mm b/src/slic3r/Utils/MacDarkMode.mm index 58ff02ff5d1..a7c063e1870 100644 --- a/src/slic3r/Utils/MacDarkMode.mm +++ b/src/slic3r/Utils/MacDarkMode.mm @@ -151,6 +151,9 @@ - (BOOL)prepareForDragOperation2:(id)info - (BOOL)performDragOperation2:(id)info { NSURL* url = [NSURL URLFromPasteboard:[info draggingPasteboard]]; + if (!url) { + return FALSE; + } NSString * path = [url path]; url = [NSURL fileURLWithPath: path]; [self loadFileURL:url allowingReadAccessToURL:url];