System File Chooser: fix crash on macOS 15.x
Some checks failed
CI / build (11) (push) Has been cancelled
Native Libraries / Natives (macos-latest) (push) Has been cancelled
Native Libraries / Natives (ubuntu-24.04-arm) (push) Has been cancelled
Native Libraries / Natives (ubuntu-latest) (push) Has been cancelled
Native Libraries / Natives (windows-latest) (push) Has been cancelled
CI / build-on (17, ) (push) Has been cancelled
CI / build-on (21, ) (push) Has been cancelled
CI / build-on (23, ) (push) Has been cancelled
CI / build-on (8, ) (push) Has been cancelled
CI / snapshot (push) Has been cancelled
CI / release (push) Has been cancelled

This commit is contained in:
Karl Tauber
2025-06-17 11:51:33 +02:00
parent 0f27125107
commit 5c2d8ba555
3 changed files with 1 additions and 1 deletions

View File

@@ -387,7 +387,7 @@ JNIEXPORT jobjectArray JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_
static NSArray* getDialogURLs( NSSavePanel* dialog ) { static NSArray* getDialogURLs( NSSavePanel* dialog ) {
if( [dialog isKindOfClass:[NSOpenPanel class]] ) if( [dialog isKindOfClass:[NSOpenPanel class]] )
return static_cast<NSOpenPanel*>(dialog).URLs; return [[NSArray alloc] initWithArray: static_cast<NSOpenPanel*>(dialog).URLs];
NSURL* url = dialog.URL; NSURL* url = dialog.URL;
// use '[[NSArray alloc] initWithObject:url]' here because '@[url]' crashes on macOS 10.14 // use '[[NSArray alloc] initWithObject:url]' here because '@[url]' crashes on macOS 10.14