]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use potentially NULL m_styleListBox (coverity CID 190)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 Mar 2007 15:35:44 +0000 (15:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 Mar 2007 15:35:44 +0000 (15:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextstyles.cpp

index da627387e28dcad805ca919f14a78db84ccb9f3f..38e555315000a818a96415e6fdbd1312a584d042 100644 (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;