From 2feca9d8b02ce2e5704b20ef3e68c86c58e397a6 Mon Sep 17 00:00:00 2001 From: Christopher-Marcel Esser Date: Mon, 17 Oct 2022 13:05:14 +0200 Subject: [PATCH] Don't crash when no dialog title is provided. --- Source/SpiderEye.Mac/Dialogs/CocoaDialog.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SpiderEye.Mac/Dialogs/CocoaDialog.cs b/Source/SpiderEye.Mac/Dialogs/CocoaDialog.cs index 32e2a998..a8ad9f85 100644 --- a/Source/SpiderEye.Mac/Dialogs/CocoaDialog.cs +++ b/Source/SpiderEye.Mac/Dialogs/CocoaDialog.cs @@ -18,7 +18,7 @@ public DialogResult Show(IWindow? parent) var window = NativeCast.To(parent); var dialog = CreateDialog(); - ObjC.Call(dialog.Handle, "setTitle:", NSString.Create(Title)); + ObjC.Call(dialog.Handle, "setTitle:", NSString.Create(Title ?? string.Empty)); ObjC.Call(dialog.Handle, "setCanCreateDirectories:", true); int result = dialog.Run(window);