Skip to content

Commit

Permalink
Fixes leak in cursesdriver (can't test)
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed Oct 6, 2023
1 parent 59d6d5e commit 03e29f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,11 @@ public override void End ()
StopReportingMouseMoves ();
SetCursorVisibility (CursorVisibility.Default);

_mainLoop.RemoveWatch (_processInputToken);
_mainLoop.WinChanged -= ProcessInput;

if (_mainLoop != null) {
_mainLoop.RemoveWatch (_processInputToken);
_mainLoop.WinChanged -= ProcessInput;
}

if (RunningUnitTests) {
return;
}
Expand Down

0 comments on commit 03e29f3

Please sign in to comment.