diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 3b8ed0a9c59..db1e9aee9ad 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -318,7 +318,7 @@ QmlEngine::~QmlEngine() for (iter = d->sourceEditors.begin(); iter != d->sourceEditors.end(); ++iter) { QWeakPointer textEditPtr = iter.value(); if (textEditPtr) - documentsToClose << textEditPtr.data()->document(); + documentsToClose << textEditPtr.toStrongRef().data()->document(); } EditorManager::closeDocuments(Utils::toList(documentsToClose));