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

@ -57,7 +57,8 @@ namespace GraphicalUserInterface
LastHeight = ((Window *)this->ParentWindow)->GetPosition().Height;
this->mem->FreePages(this->Buffer->Data, TO_PAGES(this->Buffer->Size));
delete this->Buffer;
this->Buffer->Data = nullptr;
delete this->Buffer, this->Buffer = nullptr;
this->Buffer = new ScreenBitmap;
this->Buffer->Width = LastWidth;