diff --git a/src/st_stuff.c b/src/st_stuff.c index c6e6befc62ee046e2a0ab7b333d33db1d5a7a494..a6bd77cfae7801e774b527ac02f6cf0a8a1df172 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -2512,6 +2512,8 @@ num: static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offset) { INT32 interval, i; + if (stplyr->mo == NULL) + return 0; // player just joined after spectating, can happen on custom gamemodes. UINT32 dist = ((UINT32)P_AproxDistance(P_AproxDistance(stplyr->mo->x - hunt->x, stplyr->mo->y - hunt->y), stplyr->mo->z - hunt->z))>>FRACBITS; if (dist < 128)