diff --git a/mythtv/libs/libmythui/mythuicheckbox.cpp b/mythtv/libs/libmythui/mythuicheckbox.cpp index 49984730caf..99e4ea7618c 100644 --- a/mythtv/libs/libmythui/mythuicheckbox.cpp +++ b/mythtv/libs/libmythui/mythuicheckbox.cpp @@ -73,7 +73,8 @@ void MythUICheckBox::toggleCheckState() void MythUICheckBox::SetCheckState(MythUIStateType::StateType state) { m_currentCheckState = state; - m_CheckState->DisplayState(state); + if (m_CheckState) + m_CheckState->DisplayState(state); if (state == MythUIStateType::Off) emit DependChanged(true); @@ -117,7 +118,8 @@ void MythUICheckBox::Select() return; m_state = "selected"; - m_BackgroundState->DisplayState(m_state); + if (m_BackgroundState) + m_BackgroundState->DisplayState(m_state); } void MythUICheckBox::Deselect() @@ -127,19 +129,22 @@ void MythUICheckBox::Deselect() else m_state = "disabled"; - m_BackgroundState->DisplayState(m_state); + if (m_BackgroundState) + m_BackgroundState->DisplayState(m_state); } void MythUICheckBox::Enable() { m_state = "active"; - m_BackgroundState->DisplayState(m_state); + if (m_BackgroundState) + m_BackgroundState->DisplayState(m_state); } void MythUICheckBox::Disable() { m_state = "disabled"; - m_BackgroundState->DisplayState(m_state); + if (m_BackgroundState) + m_BackgroundState->DisplayState(m_state); } /** \brief Mouse click/movement handler, receives mouse gesture events from the