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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2013-11-28 16:23:29 +00:00
parent 485ecdf721
commit d15f2b7385

View File

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