mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Bug fix: Add defer for lock
This commit is contained in:
parent
9555e83589
commit
2def3e5e6e
@ -67,7 +67,7 @@ func newSharedImagePart(width, height int) *sharedImagePart {
|
|||||||
const maxSize = 2048
|
const maxSize = 2048
|
||||||
|
|
||||||
sharedImageLock.Lock()
|
sharedImageLock.Lock()
|
||||||
sharedImageLock.Unlock()
|
defer sharedImageLock.Unlock()
|
||||||
|
|
||||||
if width > maxSize || height > maxSize {
|
if width > maxSize || height > maxSize {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user