Skip to content

Commit

Permalink
dont crash on esc
Browse files Browse the repository at this point in the history
  • Loading branch information
Rytisgit committed Dec 29, 2023
1 parent ab20d40 commit af9740c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TtyRecDecoder/TtyRecKeyframeDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ public void Dispose()
// n.b. Resize uses this -- we may need to refactor if we need to do something permanent

LoadCancel = true;
LoadThread.Join();
foreach (var ap in Packets) ap.RestartPosition.Dispose();
//DoBackgroundLoad is called in a different way, which might still be wrong, but need to be done
// for the uno version, since it doesn't support threading, until a recent update?
//LoadThread.Join();
foreach (var ap in Packets) ap.RestartPosition?.Dispose();
Packets.Clear();

Debug.Assert(!LoadThread.IsAlive); // We assert this...
//Debug.Assert(!LoadThread.IsAlive); // We assert this...
LoadPacketBuffer.Clear(); // ... because we're not locking this.
}

Expand Down

0 comments on commit af9740c

Please sign in to comment.