mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-10 10:24:07 +02:00
Fix issue where buttons will cause heap corruption if they are removed from inside DoAction
This commit is contained in:
@@ -1490,7 +1490,6 @@ void GameView::NotifyNotificationsChanged(GameModel * sender)
|
|||||||
}
|
}
|
||||||
notificationComponents.clear();
|
notificationComponents.clear();
|
||||||
|
|
||||||
|
|
||||||
std::vector<Notification*> notifications = sender->GetNotifications();
|
std::vector<Notification*> notifications = sender->GetNotifications();
|
||||||
|
|
||||||
int currentY = YRES-23;
|
int currentY = YRES-23;
|
||||||
|
@@ -151,10 +151,9 @@ void Button::OnMouseUp(int x, int y, unsigned int button)
|
|||||||
|
|
||||||
if(isButtonDown)
|
if(isButtonDown)
|
||||||
{
|
{
|
||||||
|
isButtonDown = false;
|
||||||
DoAction();
|
DoAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
isButtonDown = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Button::OnMouseClick(int x, int y, unsigned int button)
|
void Button::OnMouseClick(int x, int y, unsigned int button)
|
||||||
|
Reference in New Issue
Block a user