Calling a virtual function from a destructor is not good:
rearranged code to avoid it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -64,7 +64,7 @@ static void wxTLWEventHandler( Widget wid,
|
||||
// wxTopLevelWindowMotif implementation
|
||||
// ===========================================================================
|
||||
|
||||
wxTopLevelWindowMotif::~wxTopLevelWindowMotif()
|
||||
void wxTopLevelWindowMotif::PreDestroy()
|
||||
{
|
||||
wxTopLevelWindows.DeleteObject(this);
|
||||
|
||||
@@ -85,9 +85,10 @@ wxTopLevelWindowMotif::~wxTopLevelWindowMotif()
|
||||
wxTLWEventHandler,
|
||||
(XtPointer)this );
|
||||
}
|
||||
}
|
||||
|
||||
DoDestroy();
|
||||
|
||||
wxTopLevelWindowMotif::~wxTopLevelWindowMotif()
|
||||
{
|
||||
SetMainWidget( (WXWidget)0 );
|
||||
|
||||
// If this is the last top-level window, exit.
|
||||
|
Reference in New Issue
Block a user