Fix crash in render-perf-test

This commit is contained in:
Brad Davis 2017-03-22 22:44:05 -07:00
parent a463013d90
commit 944255a37b

View file

@ -996,7 +996,7 @@ void EntityTreeRenderer::checkAndCallPreload(const EntityItemID& entityID, const
}
bool shouldLoad = entity->shouldPreloadScript() && _entitiesScriptEngine;
QString scriptUrl = entity->getScript();
if ((unloadFirst && shouldLoad) || scriptUrl.isEmpty()) {
if (shouldLoad && (unloadFirst || scriptUrl.isEmpty())) {
_entitiesScriptEngine->unloadEntityScript(entityID);
entity->scriptHasUnloaded();
}