mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:24:00 +02:00
Job #19766 BUG: Stop or reload all scripts crashes interface fixed.
QUrl(name).toString() does not equal name, therefore removing name from ScriptEngineHash was failing, and a dangling pointer was left in the script engine hash map.
This commit is contained in:
parent
a8d504fc81
commit
c8c8bccbf3
1 changed files with 1 additions and 1 deletions
|
@ -3494,7 +3494,7 @@ ScriptEngine* Application::loadScript(const QString& scriptName, bool loadScript
|
|||
// start the script on a new thread...
|
||||
QUrl scriptUrl(scriptName);
|
||||
scriptEngine = new ScriptEngine(scriptUrl, &_controllerScriptingInterface);
|
||||
_scriptEnginesHash.insert(scriptName, scriptEngine);
|
||||
_scriptEnginesHash.insert(scriptUrl.toString(), scriptEngine);
|
||||
|
||||
if (!scriptEngine->hasScript()) {
|
||||
qDebug() << "Application::loadScript(), script failed to load...";
|
||||
|
|
Loading…
Reference in a new issue