Openfiledialog and savefiledialog crashes on cancel

Can you try passing nullptr instead the ParentWindowHandle?

In one of my projects I’m using the ‘OpenDirectoryDialog’ function only, using nullptr as window handle param and it works fine.

In the Engine code, I only found Editor Modules passing Handles of windows generated via Slate (using FSlateApplication::Get().FindBestParentWindowHandleForDialogs(nullptr)).

And I found this in HoloLensImageResourcesCustomization.cpp:

void PickGltfFor(const FString& ModelPath)
	{
		IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();
		if (!DesktopPlatform)
		{
			return;
		}

		FText Title = FText::FromString("glb");
		FString TitleExtensions = TEXT("*.glb");

		TArray<FString> OutFiles;
		const FString Filter = FString::Printf(TEXT("%s files (%s)|%s"), *Title.ToString(), *TitleExtensions, *TitleExtensions);
		const FString DefaultPath = FEditorDirectories::Get().GetLastDirectory(ELastDirectory::GENERIC_OPEN);

		if (DesktopPlatform->OpenFileDialog(nullptr, FText::Format(LOCTEXT("GltfPickerDialogTitle", "Choose a {0} file"), Title).ToString(), DefaultPath, TEXT(""), Filter, EFileDialogFlags::None, OutFiles))
		{
			check(OutFiles.Num() == 1);

			FString SourceImagePath = FPaths::ConvertRelativePathToFull(OutFiles[0]);
			FEditorDirectories::Get().SetLastDirectory(ELastDirectory::GENERIC_OPEN, FPaths::GetPath(SourceImagePath));

			if (ModelPath != SourceImagePath)
			{
				IFileManager::Get().Copy(*ModelPath, *SourceImagePath);
			}
		}

	}