diff --git a/release/NativeEditPlugin/scripts/NativeEditBox.cs b/release/NativeEditPlugin/scripts/NativeEditBox.cs index 8206a4a..6c89d7d 100644 --- a/release/NativeEditPlugin/scripts/NativeEditBox.cs +++ b/release/NativeEditPlugin/scripts/NativeEditBox.cs @@ -289,6 +289,10 @@ private IEnumerator HandlePluginMessageOnNextFrame(JsonObject jsonMsg) protected virtual void HandlePluginMessage(JsonObject jsonMsg) { + // By the time this is called the component might be destroyed + if (this == null) + return; + string msg = jsonMsg.GetString("msg"); if (msg.Equals(MSG_TEXT_BEGIN_EDIT)) {