summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene.c b/scene.c
index ec1d236..0984023 100644
--- a/scene.c
+++ b/scene.c
@@ -201,9 +201,10 @@ delscene(Scene *s)
void
clearscene(Scene *s)
{
- Entity *e;
+ Entity *e, *ne;
- for(e = s->ents.next; e != &s->ents; e = e->next){
+ for(e = s->ents.next; e != &s->ents; e = ne){
+ ne = e->next;
s->delent(s, e);
delentity(e);
}