mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-10 02:16:37 +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();
|
||||
|
||||
|
||||
std::vector<Notification*> notifications = sender->GetNotifications();
|
||||
|
||||
int currentY = YRES-23;
|
||||
|
@@ -151,10 +151,9 @@ void Button::OnMouseUp(int x, int y, unsigned int button)
|
||||
|
||||
if(isButtonDown)
|
||||
{
|
||||
isButtonDown = false;
|
||||
DoAction();
|
||||
}
|
||||
|
||||
isButtonDown = false;
|
||||
}
|
||||
|
||||
void Button::OnMouseClick(int x, int y, unsigned int button)
|
||||
|
Reference in New Issue
Block a user