mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Fix crash clicking combobox scrollbar of dithering matrices in Dynamics popup (fix #2984)
We're trying to access the display() attribute of a kMouseDownMessage message when the display was already deleted from Manager::_closeWindow.
This commit is contained in:
parent
f32393bb31
commit
c1628e4c62
@ -1172,13 +1172,19 @@ void Manager::removeMessagesForDisplay(Display* display)
|
||||
ASSERT(manager_thread == base::this_thread::native_id());
|
||||
#endif
|
||||
|
||||
for (Message* msg : msg_queue)
|
||||
if (msg->display() == display)
|
||||
for (Message* msg : msg_queue) {
|
||||
if (msg->display() == display) {
|
||||
msg->removeRecipient(msg->recipient());
|
||||
msg->setDisplay(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
for (Message* msg : used_msg_queue)
|
||||
if (msg->display() == display)
|
||||
for (Message* msg : used_msg_queue) {
|
||||
if (msg->display() == display) {
|
||||
msg->removeRecipient(msg->recipient());
|
||||
msg->setDisplay(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::removePaintMessagesForDisplay(Display* display)
|
||||
|
Loading…
Reference in New Issue
Block a user