mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
internal/uidriver/js: bug fix: context might be nil before the loop starts
Closes #1928
This commit is contained in:
parent
88612b1248
commit
ebb4851a32
@ -285,6 +285,11 @@ func (u *UserInterface) update() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) updateImpl(force bool) error {
|
func (u *UserInterface) updateImpl(force bool) error {
|
||||||
|
// context can be nil when an event is fired but the loop doesn't start yet (#1928).
|
||||||
|
if u.context == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
u.input.updateGamepads()
|
u.input.updateGamepads()
|
||||||
u.input.updateForGo2Cpp()
|
u.input.updateForGo2Cpp()
|
||||||
u.updateSize()
|
u.updateSize()
|
||||||
|
Loading…
Reference in New Issue
Block a user