diff --git a/src/app/ui/context_bar.cpp b/src/app/ui/context_bar.cpp index 500375919..d9f0a296a 100644 --- a/src/app/ui/context_bar.cpp +++ b/src/app/ui/context_bar.cpp @@ -1770,7 +1770,9 @@ private: } void updateLayout() { - const bool visible = (m_doc && !m_doc->sprite()->slices().empty()); + const bool visible = (m_doc && + m_doc->sprite() && + !m_doc->sprite()->slices().empty()); const bool relayout = (visible != m_combobox.isVisible() || visible != m_action.isVisible());