From e43e6049667a8655989e3e190e9a0cbf3b06a41e Mon Sep 17 00:00:00 2001 From: mlangkabel Date: Fri, 1 Jun 2018 14:58:51 +0200 Subject: [PATCH] logic: fixed crash in include validation --- .../QtProjectWizzardContentPaths.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp index 61cfff6f..c0b994b0 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp @@ -622,13 +622,13 @@ void QtProjectWizzardContentPathsHeaderSearch::validateIncludesButtonClicked() { // TODO: regard Force Includes here, too! m_window->saveContent(); - - std::shared_ptr pathSettings = std::dynamic_pointer_cast(m_settings); - std::shared_ptr excludeFilterSettings = std::dynamic_pointer_cast(m_settings); - - if (pathSettings && excludeFilterSettings) // FIXME: pass msettings as required type + + std::thread([&]() { - std::thread([&]() + std::shared_ptr pathSettings = std::dynamic_pointer_cast(m_settings); + std::shared_ptr excludeFilterSettings = std::dynamic_pointer_cast(m_settings); + + if (pathSettings && excludeFilterSettings) // FIXME: pass msettings as required type { std::vector unresolvedIncludes; { @@ -683,8 +683,8 @@ void QtProjectWizzardContentPathsHeaderSearch::validateIncludesButtonClicked() } } m_showValidationResultFunctor(unresolvedIncludes); - }).detach(); - } + } + }).detach(); }