Fix issue where buttons will cause heap corruption if they are removed from inside DoAction

This commit is contained in:
Simon Robertshaw 2012-08-10 22:59:46 +01:00
parent 5a8d26554a
commit a8fbd905c2
2 changed files with 1 additions and 3 deletions

View File

@ -1490,7 +1490,6 @@ void GameView::NotifyNotificationsChanged(GameModel * sender)
}
notificationComponents.clear();
std::vector<Notification*> notifications = sender->GetNotifications();
int currentY = YRES-23;

View File

@ -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)