Ticket #15681 (closed defect: fixed)
wxRichTextCtrl: Crash when deleting a wxRichTextTable row or column
|Reported by:||dghart||Owned by:||juliansmart|
|Keywords:||wxRichTextAction regression crash||Cc:|
Since the 254eb68 (r75124) commit, deleting a row or column of a wxRichTextTable crashes with the next paint event. This can be seen in the richtext sample, and the RichTextCtrlTestCase fails with a segfault.
It turns out to be due to the new line in richtextbuffer.cpp:11612:
A wxRichTextAction with the wxRICHTEXT_CHANGE_OBJECT flag does an immediate Do(), at a time when obj and m_object are the same (the current table) so NULLing the parent is going to cause problems.
The patch fixes the crash simply by removing that line. However if it was inserted to solve particular issue, rather than just good practice, checking for obj/m_object identity might work.