mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix clang-analyzer-core.NonNullParamChecker
/media/ddnet/src/game/server/entities/projectile.cpp:201:37: warning: Forming reference to null pointer [clang-analyzer-core.NonNullParamChecker] Found = GetNearestAirPosPlayer(pTargetChr->m_Pos, &PossiblePos); ^
This commit is contained in:
parent
5c1b8cd221
commit
98d4baabed
|
@ -198,7 +198,7 @@ void CProjectile::Tick()
|
||||||
vec2 PossiblePos;
|
vec2 PossiblePos;
|
||||||
|
|
||||||
if(!Collide)
|
if(!Collide)
|
||||||
Found = GetNearestAirPosPlayer(pTargetChr->m_Pos, &PossiblePos);
|
Found = GetNearestAirPosPlayer(pTargetChr ? pTargetChr->m_Pos : ColPos, &PossiblePos);
|
||||||
else
|
else
|
||||||
Found = GetNearestAirPos(NewPos, CurPos, &PossiblePos);
|
Found = GetNearestAirPos(NewPos, CurPos, &PossiblePos);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue