don't use potentially NULL m_styleListBox (coverity CID 190)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-03-30 15:35:44 +00:00
parent 54a8a78e3b
commit cd5dea50f8

View File

@ -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;