Commit fdbee278 authored by hjk's avatar hjk

QmlInspector: Fix crash on engine ramp down

Task-number: QTCREATORBUG-14972
Change-Id: Ia2a508fab872ac4496c2cb3fa932186e8e29278d
Reviewed-by: default avatarUlf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 474ef4b4
......@@ -738,6 +738,7 @@ void QmlInspectorAgent::addWatchData(const ObjectReference &obj,
bool append)
{
qCDebug(qmlInspectorLog) << '(' << obj << parentIname << ')';
QTC_ASSERT(m_debuggerEngine, return);
int objDebugId = obj.debugId();
QByteArray objIname = buildIName(parentIname, objDebugId);
......@@ -831,6 +832,7 @@ bool QmlInspectorAgent::isConnected() const
void QmlInspectorAgent::clearObjectTree()
{
if (m_debuggerEngine)
m_debuggerEngine->watchHandler()->removeAllData(true);
m_objectTreeQueryIds.clear();
m_fetchDataIds.clear();
......
......@@ -32,6 +32,7 @@
#define QMLINSPECTORAGENT_H
#include <QStack>
#include <QPointer>
#include <QTimer>
#include <qmldebug/baseenginedebugclient.h>
......@@ -126,7 +127,7 @@ private:
void clearObjectTree();
private:
DebuggerEngine *m_debuggerEngine;
QPointer<DebuggerEngine> m_debuggerEngine;
QmlDebug::BaseEngineDebugClient *m_engineClient;
quint32 m_engineQueryId;
......
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