mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
Fix crash by end iterator while closing a window
This commit is contained in:
parent
a96b171095
commit
84bdce01f2
@ -529,7 +529,7 @@ remove_window(GraphicsOutput *window) {
|
|||||||
// Also check whether it is in _new_windows.
|
// Also check whether it is in _new_windows.
|
||||||
{
|
{
|
||||||
MutexHolder new_windows_holder(_new_windows_lock, current_thread);
|
MutexHolder new_windows_holder(_new_windows_lock, current_thread);
|
||||||
_new_windows.erase(std::remove(_new_windows.begin(), _new_windows.end(), ptwin));
|
_new_windows.erase(std::remove(_new_windows.begin(), _new_windows.end(), ptwin), _new_windows.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user