- Duke: Add nullptr check to haskey().

This commit is contained in:
Mitchell Richters 2022-01-05 18:05:15 +11:00
parent b422b049c1
commit 9de4b4753a

View file

@ -974,6 +974,8 @@ bool movementBlocked(player_struct *p)
int haskey(sectortype* sectp, int snum)
{
auto p = &ps[snum];
if (!sectp)
return 0;
if (!sectp->keyinfo)
return 1;
if (sectp->keyinfo > 6)