From cd5dea50f87cfdcf2377ff4b73b19a1a9732cf24 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 30 Mar 2007 15:35:44 +0000 Subject: [PATCH] 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 --- src/richtext/richtextstyles.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;