X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbeac4bd72c8604616919c89f0450899b182313a..306dfc2b3d49ca45445bdfb2164fe1eea45ab321:/utils/ogl/samples/ogledit/ogledit.cpp diff --git a/utils/ogl/samples/ogledit/ogledit.cpp b/utils/ogl/samples/ogledit/ogledit.cpp index d6172e37db..87f19e6e85 100644 --- a/utils/ogl/samples/ogledit/ogledit.cpp +++ b/utils/ogl/samples/ogledit/ogledit.cpp @@ -177,13 +177,11 @@ void MyFrame::OnSize(wxSizeEvent& event) void MyFrame::OnCloseWindow(wxCloseEvent& event) { - if (wxDocParentFrame::OnClose()) + wxDocParentFrame::OnCloseWindow(event); + if (!event.GetVeto()) { wxOGLCleanUp(); - this->Destroy(); } - else - event.Veto(); } // Intercept menu commands