QmlJSDebugger: Fix crash when stopping debugger

The destructor of QmlAdapter deletes the QDeclarativeDebugConnection,
which in turn results in status changes to the QmLJSInspectorClient. This
again leads to QmlAdapter::logServiceStatusChange() being called for the
already half-destructed object ... break this change by guarding the pointer
to QmlAdapter in QmlJSClientProxy.

Change-Id: I7ae3d45b2146b4f02e3843375ecf276ae75d5ea0
Task-number: QTCREATORBUG-5500
Reviewed-on: http://codereview.qt.nokia.com/2276
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Kai Koehne
2011-07-27 12:30:34 +02:00
parent 87c072b3ad
commit 33c96800f0
2 changed files with 14 additions and 9 deletions

View File

@@ -165,7 +165,7 @@ private:
Q_DISABLE_COPY(ClientProxy)
void buildDebugIdHashRecursive(const QDeclarativeDebugObjectReference &ref);
Debugger::QmlAdapter *m_adapter;
QWeakPointer<Debugger::QmlAdapter> m_adapter;
QDeclarativeEngineDebug *m_engineClient;
QmlJSInspectorClient *m_inspectorClient;