When destroying an object with DestroyImmediate programmatically, an exception will occur because FI will try to access the destroyed object. This PR fixes that.
There are probably other spots in the LateBindings where a null check could be useful, but I haven't reached any other yet.
An example where this will occur is in a toolkit editor with something like this
new tk.Button(
new fiGUIContent("Remove"),
(o, c) => DestroyImmediate(this)
)
When destroying an object with
DestroyImmediate
programmatically, an exception will occur because FI will try to access the destroyed object. This PR fixes that.There are probably other spots in the LateBindings where a null check could be useful, but I haven't reached any other yet.
An example where this will occur is in a toolkit editor with something like this