- nullptr fixes

This commit is contained in:
Christoph Oelckers 2020-10-27 07:00:39 +01:00
parent 36370b71e2
commit 34d0219d06
2 changed files with 4 additions and 4 deletions

View file

@ -1638,7 +1638,7 @@ void checksectors_d(int snum)
}
if (neartagsprite >= 0)
if (neartagsprite != nullptr)
{
if (fi.checkhitswitch(snum, -1, neartagsprite)) return;

View file

@ -2565,7 +2565,7 @@ void checksectors_r(int snum)
if (neartagsprite == nullptr && neartagwall == -1 && neartagsector == -1)
{
neartag(p->posx, p->posy, p->posz + (16 << 8), p->GetActor()->s.sectnum, p->angle.oang.asbuild(), &neartagsector, &neartagwall, &neartagsprite, &neartaghitdist, 1280L, 3);
if (neartagsprite >= 0)
if (neartagsprite != nullptr)
{
switch (neartagsprite->s.picnum)
{
@ -2602,7 +2602,7 @@ void checksectors_r(int snum)
if (oldz > 1280) neartagsprite = nullptr;
}
if (neartagsprite >= 0)
if (neartagsprite != nullptr)
{
if (fi.checkhitswitch(snum, -1,neartagsprite)) return;
@ -2638,7 +2638,7 @@ void checksectors_r(int snum)
return;
case EMPTYBIKE:
if (!isRRRA()) return;
OnMotorcycle(p, neartagsprite->GetIndex());
OnMotorcycle(p, neartagsprite);
return;
case EMPTYBOAT:
if (!isRRRA()) return;