1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Null check in PathEditWidget

This commit is contained in:
Brian Fiete 2022-06-03 13:44:41 -07:00
parent 454ed279dc
commit e4d350a3d5
2 changed files with 4 additions and 1 deletions

View file

@ -188,6 +188,9 @@ namespace IDE.ui
else
mDirBase = new String();
mDirectoryEdit = new PathEditWidget(.Folder);
if (gApp.mWorkspace.mDir != null)
mDirectoryEdit.mDefaultFolderPath = new .(gApp.mWorkspace.mDir);
AddEdit(mDirectoryEdit);
mDirectoryEdit.mOnContentChanged.Add(new (dlg) =>
{

View file

@ -75,7 +75,7 @@ namespace IDE.ui
String path = scope .();
GetText(path);
if (path.IsWhiteSpace)
if ((path.IsWhiteSpace) && (mDefaultFolderPath != null))
path.Set(mDefaultFolderPath);
#if !CLI
FolderBrowserDialog folderDialog = scope .();