From 59249ce85098c06a6627931bafaa3ad23a7e2701 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Thu, 9 Oct 2025 00:59:51 +1000 Subject: [PATCH] Update SharpIdeCodeEdit.cs --- src/SharpIDE.Godot/Features/CodeEditor/SharpIdeCodeEdit.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SharpIDE.Godot/Features/CodeEditor/SharpIdeCodeEdit.cs b/src/SharpIDE.Godot/Features/CodeEditor/SharpIdeCodeEdit.cs index 0c55b47..260ed0a 100644 --- a/src/SharpIDE.Godot/Features/CodeEditor/SharpIdeCodeEdit.cs +++ b/src/SharpIDE.Godot/Features/CodeEditor/SharpIdeCodeEdit.cs @@ -50,8 +50,8 @@ public partial class SharpIdeCodeEdit : CodeEdit public override void _ExitTree() { - _currentFile.FileContentsChangedExternallyFromDisk.Unsubscribe(OnFileChangedExternallyFromDisk); - _currentFile.FileContentsChangedExternally.Unsubscribe(OnFileChangedExternallyInMemory); + _currentFile?.FileContentsChangedExternallyFromDisk.Unsubscribe(OnFileChangedExternallyFromDisk); + _currentFile?.FileContentsChangedExternally.Unsubscribe(OnFileChangedExternallyInMemory); } private void OnBreakpointToggled(long line)