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

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
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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;