From 968c0a9b9ab1b39ce8f7f6806e2f7d7f99ec1c5c Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 24 May 2020 03:04:52 +0900 Subject: [PATCH] graphicscommand: Bug fix: test failures --- internal/graphicscommand/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/graphicscommand/image.go b/internal/graphicscommand/image.go index ab36bd535..68f267aeb 100644 --- a/internal/graphicscommand/image.go +++ b/internal/graphicscommand/image.go @@ -145,7 +145,7 @@ func (i *Image) InternalSize() (int, int) { // // src and shader are exclusive and only either is non-nil. func (i *Image) DrawTriangles(src *Image, vertices []float32, indices []uint16, clr *affine.ColorM, mode driver.CompositeMode, filter driver.Filter, address driver.Address, shader *Shader, uniforms map[int]interface{}) { - if src.screen { + if src != nil && src.screen { panic("graphicscommand: the screen image cannot be the rendering source") }