Resolve a segfault when device did not ever receive reset status

pull/4/head
Paul Hollinsky 2018-10-22 15:40:52 -04:00
parent dfbc40f877
commit 5a5d626225
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ bool Device::goOffline() {
if(!com->sendCommand(Command::EnableNetworkCommunication, false))
return false;
ledState = latestResetStatus->cmRunning ? LEDState::CoreMiniRunning : LEDState::Offline;
ledState = (latestResetStatus && latestResetStatus->cmRunning) ? LEDState::CoreMiniRunning : LEDState::Offline;
updateLEDState();
online = false;