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 wxString& name = wxGLCanvasName,
|
||||||
const wxPalette& palette = wxNullPalette);
|
const wxPalette& palette = wxNullPalette);
|
||||||
|
|
||||||
|
~wxGLCanvas();
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
const wxGLAttributes& dispAttrs,
|
const wxGLAttributes& dispAttrs,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
|
@@ -377,6 +377,12 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
|
|||||||
Create(parent, id, pos, size, style, name, attribList, palette);
|
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,
|
bool wxGLCanvas::Create(wxWindow *parent,
|
||||||
const wxGLAttributes& dispAttrs,
|
const wxGLAttributes& dispAttrs,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
|
Reference in New Issue
Block a user