diff options
author | Dan Gudmundsson <[email protected]> | 2013-12-20 09:20:22 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-01-14 13:26:53 +0100 |
commit | 74f6d6d74f7a3be5aece37a0b419e40d96e036d4 (patch) | |
tree | 73ffc54f3b8b9b827f6f2a9aedd46b566dce7ffa /lib/wx/c_src/gen/wxe_derived_dest.h | |
parent | 3f9b80b1e635f3b5f39bd7380b3bd777ebd98338 (diff) | |
download | otp-74f6d6d74f7a3be5aece37a0b419e40d96e036d4.tar.gz otp-74f6d6d74f7a3be5aece37a0b419e40d96e036d4.tar.bz2 otp-74f6d6d74f7a3be5aece37a0b419e40d96e036d4.zip |
wx: Fix crash when garbage collect event handlers (debugger caused seg fault)
wxStyledTextCtrl had no wrapper class so, because it was not detected
that it had virtual destructors, thus references to it was not cleaned
up on destruction. When a process dies and wx cleans up the event handlers
access was made to the deleted object and caused a seg fault.
Added a testcase which I thought could provoke the bug but didn't.
Diffstat (limited to 'lib/wx/c_src/gen/wxe_derived_dest.h')
-rw-r--r-- | lib/wx/c_src/gen/wxe_derived_dest.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/wx/c_src/gen/wxe_derived_dest.h b/lib/wx/c_src/gen/wxe_derived_dest.h index 8dcaf1c1ac..7e2d4524cb 100644 --- a/lib/wx/c_src/gen/wxe_derived_dest.h +++ b/lib/wx/c_src/gen/wxe_derived_dest.h @@ -736,6 +736,12 @@ class EwxPrintout : public wxPrintout { EwxPrintout(const wxString& title) : wxPrintout(title) {}; }; +class EwxStyledTextCtrl : public wxStyledTextCtrl { + public: ~EwxStyledTextCtrl() {((WxeApp *)wxTheApp)->clearPtr(this);}; + EwxStyledTextCtrl(wxWindow * parent,wxWindowID id,const wxPoint& pos,const wxSize& size,long style) : wxStyledTextCtrl(parent,id,pos,size,style) {}; + EwxStyledTextCtrl() : wxStyledTextCtrl() {}; +}; + class EwxClipboard : public wxClipboard { public: ~EwxClipboard() {((WxeApp *)wxTheApp)->clearPtr(this);}; EwxClipboard() : wxClipboard() {}; |