Fix for #15715: NULL check required in wxRichTextBuffer::SetStyleSheetAndNotify()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2013-11-28 16:23:11 +00:00
parent 97f58c1603
commit 31e52f61d0

View File

@ -8781,7 +8781,10 @@ bool wxRichTextBuffer::SetStyleSheetAndNotify(wxRichTextStyleSheet* sheet)
wxRichTextEvent event(wxEVT_RICHTEXT_STYLESHEET_REPLACING, winid);
event.SetEventObject(GetRichTextCtrl());
event.SetContainer(GetRichTextCtrl()->GetFocusObject());
if (GetRichTextCtrl())
event.SetContainer(GetRichTextCtrl()->GetFocusObject());
else
event.SetContainer(this);
event.SetOldStyleSheet(oldSheet);
event.SetNewStyleSheet(sheet);
event.Allow();