From 9f3f9e64cc0813d6509c0c03c1e033b68b02bcf1 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 3 Apr 2022 00:39:05 +0900 Subject: [PATCH] internal/graphicscommand: add panic at convertUniforms --- internal/graphicscommand/shader.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/graphicscommand/shader.go b/internal/graphicscommand/shader.go index 193f94d2b..3a1793458 100644 --- a/internal/graphicscommand/shader.go +++ b/internal/graphicscommand/shader.go @@ -184,6 +184,10 @@ func (s *Shader) Dispose() { } func (s *Shader) convertUniforms(uniforms map[string]interface{}) [][]float32 { + if s.shader == nil { + panic("graphicscommand: shader is not compiled yet") + } + type index struct { resultIndex int shaderUniformIndex int