mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/ui: bug fix: getMetal might return a nil pointer as a non-nil interface
This commit is contained in:
parent
eeb5687b73
commit
c61be3c532
@ -47,7 +47,10 @@ func (g *graphicsDriverGetterImpl) getMetal() graphicsdriver.Graphics {
|
|||||||
if g.gomobileBuild {
|
if g.gomobileBuild {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return metal.Get()
|
if m := metal.Get(); m != nil {
|
||||||
|
return m
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetUIView(uiview uintptr) {
|
func SetUIView(uiview uintptr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user