From 5d4c4f12833353b5c1693e8a5ee69b1a21103560 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 31 Dec 2017 20:55:04 +0900 Subject: [PATCH] graphics: Bug fix: Don't delete the screen framebuffer (iOS) --- internal/graphics/command.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/graphics/command.go b/internal/graphics/command.go index a6e74d0a2..89c29091b 100644 --- a/internal/graphics/command.go +++ b/internal/graphics/command.go @@ -333,7 +333,8 @@ type disposeCommand struct { // Exec executes the disposeCommand. func (c *disposeCommand) Exec(indexOffsetInBytes int) error { - if c.target.framebuffer != nil { + if c.target.framebuffer != nil && + c.target.framebuffer.native != opengl.GetContext().ScreenFramebuffer() { opengl.GetContext().DeleteFramebuffer(c.target.framebuffer.native) } if c.target.texture != nil {