diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index da627387e2..38e5553150 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -955,8 +955,10 @@ wxRichTextCtrl* wxRichTextStyleListCtrl::GetRichTextCtrl() const /// Set/get the style type to display void wxRichTextStyleListCtrl::SetStyleType(wxRichTextStyleListBox::wxRichTextStyleType styleType) { - if (m_styleListBox) - m_styleListBox->SetStyleType(styleType); + if ( !m_styleListBox ) + return; + + m_styleListBox->SetStyleType(styleType); m_dontUpdate = true;