From b52a02a17809ce5f36b80c8c902acb19f72d93d4 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 3 Apr 2022 00:21:21 +0900 Subject: [PATCH] internal/ui: bug fix: crash when Image.MarkDisposed is called multiple times Closes #2048 --- internal/ui/image.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/ui/image.go b/internal/ui/image.go index a4521fa55..12b3ec1d5 100644 --- a/internal/ui/image.go +++ b/internal/ui/image.go @@ -52,6 +52,9 @@ func newScreenFramebufferImage(width, height int) *Image { } func (i *Image) MarkDisposed() { + if i.mipmap == nil { + return + } i.mipmap.MarkDisposed() i.mipmap = nil }