Explorar o código

Fixing crash on shutdown due to a GUIPanel being deallocated twice

BearishSun %!s(int64=10) %!d(string=hai) anos
pai
achega
26e67880b5
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      SBansheeEngine/Source/BsScriptObjectManager.cpp

+ 2 - 2
SBansheeEngine/Source/BsScriptObjectManager.cpp

@@ -59,13 +59,13 @@ namespace BansheeEngine
 			ScriptAssemblyManager::instance().loadAssemblyInfo(assemblyPair.first);
 		}
 
-		onRefreshDomainLoaded();
-
 		Vector<ScriptObjectBase*> scriptObjCopy(mScriptObjects.size()); // Store originals as we could add new objects during the next iteration
 		UINT32 idx = 0;
 		for (auto& scriptObject : mScriptObjects)
 			scriptObjCopy[idx++] = scriptObject;
 
+		onRefreshDomainLoaded();
+
 		for (auto& scriptObject : scriptObjCopy)
 			scriptObject->_restoreManagedInstance();