From 77858aac6ade09fa14f4e14b8add41ac90a88be4 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Fri, 18 Mar 2016 18:01:46 +0100 Subject: [PATCH] Fix a crash problem of Folder as Project in debug build. Make sure the folder does exist before adding it for monitoring. --- PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp index 29aa67240..62acfacf3 100644 --- a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp +++ b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp @@ -912,6 +912,9 @@ bool isRelatedRootFolder(const generic_string & relatedRoot, const generic_strin void FileBrowser::addRootFolder(generic_string rootFolderPath) { + if (not ::PathFileExists(rootFolderPath.c_str())) + return; + // make sure there's no '\' at the end if (rootFolderPath[rootFolderPath.length() - 1] == '\\') {