diff --git a/internal/ui/ui_ios.go b/internal/ui/ui_ios.go index f673512a7..c0a4c9eed 100644 --- a/internal/ui/ui_ios.go +++ b/internal/ui/ui_ios.go @@ -47,7 +47,10 @@ func (g *graphicsDriverGetterImpl) getMetal() graphicsdriver.Graphics { if g.gomobileBuild { return nil } - return metal.Get() + if m := metal.Get(); m != nil { + return m + } + return nil } func SetUIView(uiview uintptr) {