Skip to content

Commit

Permalink
Allow docs browser thread to quit early
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Dec 18, 2023
1 parent 10a60f8 commit 4409f15
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/Sidebar/DocumentationBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,11 @@ class DocumentationBrowser : public Component, public FileDragAndDropTarget, pri
static File versionDataDir = ProjectInfo::appDataDir.getChildFile("Versions");
static File toolchainDir = ProjectInfo::appDataDir.getChildFile("Toolchain");

if (!directory.exists() || !directory.isDirectory() || directory == versionDataDir || directory == toolchainDir) {
return ValueTree();
if (threadShouldExit() || !directory.exists() || !directory.isDirectory() || directory == versionDataDir || directory == toolchainDir)
{
return ValueTree();
}

ValueTree rootNode("Folder");
rootNode.setProperty("Name", directory.getFileName(), nullptr);
rootNode.setProperty("Path", directory.getFullPathName(), nullptr);
Expand Down

0 comments on commit 4409f15

Please sign in to comment.