Skip to content
Snippets Groups Projects
Unverified Commit 349a6b09 authored by samwiddowson's avatar samwiddowson Committed by GitHub
Browse files

Fixed a crash when adding opening the dialog to add a directory resource on Mono Winforms

parent e1ce00aa
Branches
No related tags found
No related merge requests found
......@@ -283,6 +283,7 @@ namespace CodeImp.DoomBuilder.Controls
{
bool flag = false;
#if !MONO_WINFORMS
if (Environment.OSVersion.Version.Major >= 6)
{
var r = new Reflector("System.Windows.Forms");
......@@ -313,6 +314,7 @@ namespace CodeImp.DoomBuilder.Controls
}
else
{
#endif
var fbd = new FolderBrowserDialog();
fbd.Description = this.Title;
fbd.SelectedPath = this.InitialDirectory;
......@@ -320,7 +322,9 @@ namespace CodeImp.DoomBuilder.Controls
if (fbd.ShowDialog(new WindowWrapper(hWndOwner)) != DialogResult.OK) return false;
ofd.FileName = fbd.SelectedPath;
flag = true;
#if !MONO_WINFORMS
}
#endif
return flag;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment