Skip to content

Commit

Permalink
fix: also lock mutex when accessing state read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Oct 13, 2022
1 parent db66482 commit 99ad2ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions standard_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ func (r *standardRenderer) clearScreen() {
}

func (r *standardRenderer) altScreen() bool {
r.mtx.Lock()
defer r.mtx.Unlock()

return r.altScreenActive
}

Expand Down

0 comments on commit 99ad2ed

Please sign in to comment.