AP_Notify: small change to Display health logic

This commit is contained in:
Randy Mackay 2017-01-20 14:41:08 +09:00 committed by Lucas De Marchi
parent 847c68bf72
commit 07c08c09a3
1 changed files with 3 additions and 5 deletions

View File

@ -379,13 +379,11 @@ bool Display::init(void)
break;
}
if (_driver != nullptr) {
_healthy = _driver->hw_init();
}
if (!_healthy) {
if (!_driver || !_driver->hw_init()) {
_healthy = false;
return false;
}
_healthy = true;
// update all on display
update_all();