Skip to content

Commit

Permalink
Don't throw in InterruptLine when leaving play mode
Browse files Browse the repository at this point in the history
  • Loading branch information
desplesda authored Oct 18, 2024
1 parent a0d6929 commit 3deac38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Runtime/Views/LineView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ private IEnumerator DismissLineInternal(Action onDismissalComplete)
/// <inheritdoc/>
public override void InterruptLine(LocalizedLine dialogueLine, Action onInterruptLineFinished)
{
if (this == null) {
// This line view has been destroyed, possibly as part of
// leaving play mode. Don't take any action.
return;
}

currentLine = dialogueLine;

// Cancel all coroutines that we're currently running. This will
Expand Down

0 comments on commit 3deac38

Please sign in to comment.