summaryrefslogtreecommitdiff
path: root/src/hexen/p_telept.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hexen/p_telept.c')
-rw-r--r--src/hexen/p_telept.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hexen/p_telept.c b/src/hexen/p_telept.c
index 10454c79..746938ce 100644
--- a/src/hexen/p_telept.c
+++ b/src/hexen/p_telept.c
@@ -181,11 +181,15 @@ boolean EV_Teleport(int tid, mobj_t * thing, boolean fog)
}
count = 1 + (P_Random() % count);
searcher = -1;
+ mo = NULL;
+
for (i = 0; i < count; i++)
{
mo = P_FindMobjFromTID(tid, &searcher);
}
- if (!mo)
+ if (mo == NULL)
+ {
I_Error("Can't find teleport mapspot\n");
+ }
return P_Teleport(thing, mo->x, mo->y, mo->angle, fog);
}