From 4deac219b0af86b7f80168920c8bedd070aa79c0 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 10 Nov 2017 08:31:25 -0300 Subject: Remove node from list before calling queries, fixes #10886 --- servers/physics_2d/space_2d_sw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'servers/physics_2d') diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index f9febd1093..3b8eb19dd1 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -969,15 +969,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(); } } -- cgit v1.2.3