Fix crash when using audio playback and playing editor meanwhile

This commit is contained in:
Wojtek Figat
2025-03-11 18:10:48 +01:00
parent a3cc3c79e2
commit 3c303514a4
4 changed files with 13 additions and 1 deletions

View File

@@ -732,7 +732,12 @@ Array<ScriptingObject*, HeapAllocation> Scripting::GetObjects()
{
Array<ScriptingObject*> objects;
_objectsLocker.Lock();
#if USE_OBJECTS_DISPOSE_CRASHES_DEBUGGING
for (const auto& e : _objectsDictionary)
objects.Add(e.Value.Ptr);
#else
_objectsDictionary.GetValues(objects);
#endif
_objectsLocker.Unlock();
return objects;
}