Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1624,7 +1624,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 1623 unmodified lines | |||
| 1624 | QWeakPointer<ScriptEngine> weakRef(sharedFromThis()); | 1624 | QWeakPointer<ScriptEngine> weakRef(sharedFromThis()); |
| 1625 | scriptCache->getScriptContents(entityScript, | 1625 | scriptCache->getScriptContents(entityScript, |
| 1626 | [this, weakRef, entityScript, entityID](const QString& url, const QString& contents, bool isURL, bool success, const QString& status) { | 1626 | [this, weakRef, entityScript, entityID](const QString& url, const QString& contents, bool isURL, bool success, const QString& status) { |
| 1627 | if (!weakRef) { | 1627 | QSharedPointer<ScriptEngine> strongRef(weakRef); |
| 1628 | if (!strongRef) { | ||
| 1628 | qCWarning(scriptengine) << "loadEntityScript.contentAvailable -- ScriptEngine was deleted during getScriptContents!!"; | 1629 | qCWarning(scriptengine) << "loadEntityScript.contentAvailable -- ScriptEngine was deleted during getScriptContents!!"; |
| 1629 | return; | 1630 | return; |
| 1630 | } | 1631 | } |