Prevent dangling pointer

This commit is contained in:
Alex
2023-03-14 06:24:02 +02:00
parent 855384aead
commit d7c9b7ab02
23 changed files with 91 additions and 90 deletions

View File

@ -117,8 +117,8 @@ namespace GraphicalUserInterface
WidgetCollection::~WidgetCollection()
{
delete this->mem;
delete this->Buffer;
delete this->CurrentFont;
delete this->mem, this->mem = nullptr;
delete this->Buffer, this->Buffer = nullptr;
delete this->CurrentFont, this->CurrentFont = nullptr;
}
}