mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-06 04:49:16 +00:00
Prevent dangling pointer
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user