Skip to content

Commit

Permalink
Fixed potential segfault in P_IterateThinkers.
Browse files Browse the repository at this point in the history
  • Loading branch information
danij committed Jun 25, 2008
1 parent ba1c468 commit 0c09bc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/p_think.c
Expand Up @@ -115,7 +115,7 @@ boolean P_IterateThinkers(think_t type,
thinker_t* th, *next;

th = thinkerCap.next;
while(th != &thinkerCap)
while(th != &thinkerCap && th)
{
#ifdef FAKE_MEMORY_ZONE
assert(th->next != NULL);
Expand Down

0 comments on commit 0c09bc2

Please sign in to comment.