diff --git a/VERSION b/VERSION index 1001deb1..625fd3fc 100644 --- a/VERSION +++ b/VERSION @@ -2,5 +2,5 @@ PACKAGE=picsimlab MAINVER=0 MINORVER=9 VERSION=0.9.1 -DATE=240201 +DATE=240204 VERSION_STABLE=0.9.1 diff --git a/src/picsimlab1.cc b/src/picsimlab1.cc index a6c477ba..650a6d0d 100644 --- a/src/picsimlab1.cc +++ b/src/picsimlab1.cc @@ -2148,8 +2148,8 @@ int CPWindow1::OnExtraWindowCmd(const int id, const char* ControlName, const PIC case PWA_WINDOWDESTROY: ((CPWindow*)ctrl)->Hide(); ((CPWindow*)ctrl)->DestroyChilds(); + ((CPWindow*)ctrl)->SetCanDestroy(true); ((CPWindow*)ctrl)->WDestroy(); - delete ctrl; ctrl = NULL; break; case PWA_WINDOWLOADXML: diff --git a/src/picsimlab5.cc b/src/picsimlab5.cc index 67d39ef9..761ff857 100644 --- a/src/picsimlab5.cc +++ b/src/picsimlab5.cc @@ -1271,8 +1271,8 @@ int CPWindow5::OnExtraWindowCmd(const int id, const char* ControlName, const PIC case PWA_WINDOWDESTROY: ((CPWindow*)ctrl)->Hide(); ((CPWindow*)ctrl)->DestroyChilds(); + ((CPWindow*)ctrl)->SetCanDestroy(true); ((CPWindow*)ctrl)->WDestroy(); - delete ctrl; ctrl = NULL; break; case PWA_WINDOWLOADXML: