Fix crash when applying prefab changes

#3755
This commit is contained in:
Wojtek Figat
2026-03-28 00:31:46 +01:00
parent c12948c6cc
commit 76378156f7

View File

@@ -203,7 +203,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
//Presenter.BuildLayoutOnUpdate();
// Better way is to just update the reference value using the new default instance of the prefab, created after changes apply
if (Values != null && prefab && !prefab.WaitForLoaded())
if (Values != null && (Actor)Values[0] && prefab && !prefab.WaitForLoaded())
{
var actor = (Actor)Values[0];
var prefabObjectId = actor.PrefabObjectID;