mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Fix unhandled std::bad_weak_ptr
This commit is contained in:
parent
c8eb453358
commit
9d8b801a77
1 changed files with 1 additions and 1 deletions
|
@ -2054,7 +2054,7 @@ void ScriptManager::loadEntityScript(const EntityItemID& entityID, const QString
|
|||
std::weak_ptr<ScriptManager> weakRef(shared_from_this());
|
||||
scriptCache->getScriptContents(entityScript,
|
||||
[this, weakRef, entityScript, entityID](const QString& url, const QString& contents, bool isURL, bool success, const QString& status) {
|
||||
std::shared_ptr<ScriptManager> strongRef(weakRef);
|
||||
std::shared_ptr<ScriptManager> strongRef = weakRef.lock();
|
||||
if (!strongRef) {
|
||||
qCWarning(scriptengine) << "loadEntityScript.contentAvailable -- ScriptManager was deleted during getScriptContents!!";
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue