forked from qt-creator/qt-creator
Project wizards: Fix project node assertion
Change-Id: I864139747ee6b5e7cb1ac4d59d2b11219750ddde Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -499,8 +499,13 @@ void JsonWizard::openProjectForNode(Node *node)
|
||||
{
|
||||
using namespace Utils;
|
||||
|
||||
ProjectNode *projNode = node->asProjectNode() ? node->asProjectNode() : node->parentProjectNode();
|
||||
|
||||
const ProjectNode *projNode = node->asProjectNode();
|
||||
if (!projNode) {
|
||||
if (ContainerNode * const cn = node->asContainerNode())
|
||||
projNode = cn->rootProjectNode();
|
||||
else
|
||||
projNode = node->parentProjectNode();
|
||||
}
|
||||
QTC_ASSERT(projNode, return);
|
||||
|
||||
Utils::optional<FilePath> projFilePath = projNode->visibleAfterAddFileAction();
|
||||
|
Reference in New Issue
Block a user