mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
ebiten: Bug fix: ForceUpdate could be called before initialization
Closes #1591
This commit is contained in:
parent
2f451e6014
commit
73f90f324f
@ -160,6 +160,11 @@ func (c *uiContext) Update() error {
|
||||
}
|
||||
|
||||
func (c *uiContext) ForceUpdate() error {
|
||||
// ForceUpdate can be invoked even if uiContext it not initialized yet (#1591).
|
||||
if c.outsideWidth == 0 || c.outsideHeight == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err, ok := c.err.Load().(error); ok && err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user