Commit 46538ec3 authored by Aleksy Barcz's avatar Aleksy Barcz

draw3: don't Destroy widgets that have a parent set

+ parent should destroy the widgets
+ left calling Destroy on widgets that set their parent to NULL (setting / not setting the parent doesn't seem to follow any rule)
+ Destroy'ing led to segfault on wxUninitialize (wxAppBase::CleanUp)
parent 1fe08b87
......@@ -529,20 +529,10 @@ DrawPanel::~DrawPanel()
#ifdef WXAUI_IN_PANEL
am.UnInit();
#endif
if (dinc != NULL)
dinc->Destroy();
if (sinc != NULL)
sinc->Destroy();
if (dtd != NULL)
dtd->Destroy();
if (ee != NULL)
ee->Destroy();
if (dbtw != NULL)
dbtw->Destroy();
smw->Destroy();
rw->Destroy();
pw->Destroy();
delete dw;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment