Switch to side-by-side view
--- a/src/ohradio.cxx +++ b/src/ohradio.cxx @@ -477,8 +477,12 @@ void OHRadio::setActive(bool onoff) { m_active = onoff; if (m_active) { - if (m_id) - m_dev->m_mpdcli->restoreState(m_mpdsavedstate); + if (m_id) { + // Only restore state if it was saved + if (m_mpdsavedstate.status.state != MpdStatus::MPDS_UNK) { + m_dev->m_mpdcli->restoreState(m_mpdsavedstate); + } + } maybeWakeUp(true); } else { m_dev->m_mpdcli->saveState(m_mpdsavedstate);