Avoid crashes when destroying wxGLCanvas
Block signals that are not safe to process any more.
This commit is contained in:
@@ -54,6 +54,8 @@ public:
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
~wxGLCanvas();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
const wxGLAttributes& dispAttrs,
|
||||
wxWindowID id = wxID_ANY,
|
||||
|
@@ -377,6 +377,12 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
|
||||
Create(parent, id, pos, size, style, name, attribList, palette);
|
||||
}
|
||||
|
||||
wxGLCanvas::~wxGLCanvas()
|
||||
{
|
||||
// Avoid sending further signals (i.e. if deleting the current page)
|
||||
m_qtWindow->blockSignals(true);
|
||||
}
|
||||
|
||||
bool wxGLCanvas::Create(wxWindow *parent,
|
||||
const wxGLAttributes& dispAttrs,
|
||||
wxWindowID id,
|
||||
|
Reference in New Issue
Block a user