In event_process() check for wind->next before sending EVENT_WINDOW_DRAW in case drawing will free wind
This commit is contained in:
parent
fd740500c1
commit
518e01fbe8
|
@ -1,5 +1,9 @@
|
|||
D2X-Rebirth Changelog
|
||||
|
||||
20110126
|
||||
--------
|
||||
arc/sdl/event.c: In event_process() check for wind->next before sending EVENT_WINDOW_DRAW in case drawing will free wind
|
||||
|
||||
20110124
|
||||
--------
|
||||
main/physics.c: Revamped what previously was the BUMP_HACK by checking if an object is actually intersecting a segment and move it out towards segment center just after the initial object movement composed by fvi and before velocity is made - should make inaccurate wall collisions a bit smoother and prevent objects from goind inside or through walls, too
|
||||
|
|
|
@ -148,9 +148,14 @@ void event_process(void)
|
|||
return;
|
||||
|
||||
event.type = EVENT_WINDOW_DRAW; // then draw all visible windows
|
||||
for (wind = window_get_first(); wind != NULL; wind = window_get_next(wind))
|
||||
wind = window_get_first();
|
||||
while (wind != NULL)
|
||||
{
|
||||
window *next_wind = window_get_next(wind); // check this in now in case this window closes during EVENT_WINDOW_DRAW
|
||||
if (window_is_visible(wind))
|
||||
window_send_event(wind, &event);
|
||||
wind = next_wind;
|
||||
}
|
||||
|
||||
gr_flip();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue