mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 12:08:58 +01:00
restorable: Bug fix: Unlocking should happen after restoring
This commit is contained in:
parent
1f66c155ae
commit
9dd501720e
@ -78,6 +78,7 @@ func RestoreIfNeeded() error {
|
||||
//
|
||||
// Between each frame, any image operations are not permitted, or stale images would remain when restoring
|
||||
// (#913).
|
||||
defer func() {
|
||||
firsttime := false
|
||||
theImages.once.Do(func() {
|
||||
firsttime = true
|
||||
@ -85,6 +86,7 @@ func RestoreIfNeeded() error {
|
||||
if !firsttime {
|
||||
theImages.m.Unlock()
|
||||
}
|
||||
}()
|
||||
|
||||
if !needsRestoring() {
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user