Skip to content

Commit 4409f15

Browse files
committed
Allow docs browser thread to quit early
1 parent 10a60f8 commit 4409f15

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Source/Sidebar/DocumentationBrowser.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,11 @@ class DocumentationBrowser : public Component, public FileDragAndDropTarget, pri
242242
static File versionDataDir = ProjectInfo::appDataDir.getChildFile("Versions");
243243
static File toolchainDir = ProjectInfo::appDataDir.getChildFile("Toolchain");
244244

245-
if (!directory.exists() || !directory.isDirectory() || directory == versionDataDir || directory == toolchainDir) {
246-
return ValueTree();
245+
if (threadShouldExit() || !directory.exists() || !directory.isDirectory() || directory == versionDataDir || directory == toolchainDir)
246+
{
247+
return ValueTree();
247248
}
248-
249+
249250
ValueTree rootNode("Folder");
250251
rootNode.setProperty("Name", directory.getFileName(), nullptr);
251252
rootNode.setProperty("Path", directory.getFullPathName(), nullptr);

0 commit comments

Comments
 (0)