graphicscommand: Bug fix: restorable should be enabled if not sure

init function in restorable package might reach this condition,
and for fail-safe, restoring should be enabled.
This commit is contained in:
Hajime Hoshi 2019-05-26 22:15:31 +09:00
parent 83254d30d9
commit 3ab56778e7

View File

@ -30,7 +30,9 @@ func SetGraphicsDriver(driver driver.Graphics) {
func NeedsRestoring() bool {
if theGraphicsDriver == nil {
return false
// This happens on initialization.
// Return true for fail-safe
return true
}
return theGraphicsDriver.NeedsRestoring()
}