restorable: Bug fix: Lock before resolving stale states

This commit is contained in:
Hajime Hoshi 2019-08-12 23:31:17 +09:00
parent 9dd501720e
commit 14ce0c1bcb

View File

@ -57,7 +57,7 @@ var theImages = &images{
// ResolveStaleImages is intended to be called at the end of a frame.
func ResolveStaleImages() {
// Until the begin o the frame (by RestoreIfNeeded, any operations are locked.
defer theImages.m.Lock()
theImages.m.Lock()
graphicscommand.FlushCommands()
if !needsRestoring() {