graphics: Bug fix: Add defer for lock

This commit is contained in:
Hajime Hoshi 2018-03-10 21:32:33 +09:00
parent 9555e83589
commit 2def3e5e6e

View File

@ -67,7 +67,7 @@ func newSharedImagePart(width, height int) *sharedImagePart {
const maxSize = 2048
sharedImageLock.Lock()
sharedImageLock.Unlock()
defer sharedImageLock.Unlock()
if width > maxSize || height > maxSize {
return nil