Remove node from list before calling queries, fixes #10886

(cherry picked from commit 4deac219b0)

Fixes #17793.
This commit is contained in:
Juan Linietsky 2017-11-10 08:31:25 -03:00 committed by Rémi Verschelde
parent 723c14cdfc
commit 531fb3b8e6
1 changed files with 2 additions and 2 deletions

View File

@ -1145,15 +1145,15 @@ void Space2DSW::call_queries() {
while (state_query_list.first()) {
Body2DSW *b = state_query_list.first()->self();
b->call_queries();
state_query_list.remove(state_query_list.first());
b->call_queries();
}
while (monitor_query_list.first()) {
Area2DSW *a = monitor_query_list.first()->self();
a->call_queries();
monitor_query_list.remove(monitor_query_list.first());
a->call_queries();
}
}