Commit 7b226fff authored by Christian Kandeler's avatar Christian Kandeler Committed by Eike Ziller
Browse files

ProjectExplorer: Hotfix for crash on session switch.



In ProjectTree::update() as well as in
CurrentProjectFilter::currentProjectChanged(), there are crashes due to
accesses to a pointer to a deleted project. Wrap the pointer in a
QPointer to prevent this.
May or may not be the correct long-term solution, but does fix the
crash.

Change-Id: I4182a4753578cc4765b9120a36cd8701d07c94c1
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent bd70ae32
......@@ -33,8 +33,9 @@
#include <coreplugin/locator/basefilefilter.h>
#include <QMutex>
#include <QFutureInterface>
#include <QMutex>
#include <QPointer>
namespace ProjectExplorer {
......@@ -56,7 +57,7 @@ private slots:
void markFilesAsOutOfDate();
private:
Project *m_project;
QPointer<Project> m_project;
bool m_filesUpToDate;
QMutex m_filesUpToDateMutex;
};
......
......@@ -35,6 +35,8 @@
#include <coreplugin/icontext.h>
#include <QPointer>
namespace ProjectExplorer {
class FileNode;
class FolderNode;
......@@ -92,7 +94,7 @@ private:
static ProjectTree *s_instance;
QList<Internal::ProjectTreeWidget *> m_projectTreeWidgets;
Node *m_currentNode;
Project *m_currentProject;
QPointer<Project> m_currentProject;
bool m_resetCurrentNodeFolder;
bool m_resetCurrentNodeFile;
bool m_resetCurrentNodeProject;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment