fix: check validity of node instance before accessing it.
This commit is contained in:
@@ -77,6 +77,9 @@ public partial class Plugin : EditorPlugin
|
||||
// mark debounce as completed
|
||||
_sceneTreeTimer = null;
|
||||
|
||||
// check that the instance is still valid after debouncing (could have been disposed)
|
||||
if (!IsInstanceValid(sceneRoot)) return;
|
||||
|
||||
var sceneNodes = sceneRoot.FindChildren("*").Where(node => node.Owner == sceneRoot).Append(sceneRoot).ToList();
|
||||
GD.Print($"Updating injection for root {sceneRoot.Name}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user