[iortcw] 31/95: MP: Fix clang warning

Simon McVittie smcv at debian.org
Fri Sep 8 10:41:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to tag 1.51
in repository iortcw.

commit b401dfcb4b0d78d076b81c0e79263c8795d81f25
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Tue Feb 21 17:14:10 2017 -0500

    MP: Fix clang warning
---
 MP/code/game/g_weapon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MP/code/game/g_weapon.c b/MP/code/game/g_weapon.c
index 6ff387f..8f291b3 100644
--- a/MP/code/game/g_weapon.c
+++ b/MP/code/game/g_weapon.c
@@ -701,7 +701,7 @@ void weapon_callAirStrike( gentity_t *ent ) {
 	if ( ( tr.fraction < 1.0 ) && ( !( tr.surfaceFlags & SURF_NOIMPACT ) ) ) { //SURF_SKY)) ) { // JPW NERVE changed for trenchtoast foggie prollem
 		G_SayTo( ent->parent, ent->parent, 2, COLOR_YELLOW, "Pilot: ", "Aborting, can't see target.", qtrue );
 
-		if ( ent->parent->client->sess.sessionTeam == TEAM_BLUE ) {
+		if ( ent->parent->client && ent->parent->client->sess.sessionTeam == TEAM_BLUE ) {
 			te = G_TempEntity( ent->parent->s.pos.trBase, EV_GLOBAL_CLIENT_SOUND );
 			te->s.eventParm = G_SoundIndex( "sound/multiplayer/allies/a-aborting.wav" );
 			te->s.teamNum = ent->parent->s.clientNum;
@@ -714,7 +714,7 @@ void weapon_callAirStrike( gentity_t *ent ) {
 		return;
 	}
 
-	if ( ent->parent->client->sess.sessionTeam == TEAM_BLUE ) {
+	if ( ent->parent->client && ent->parent->client->sess.sessionTeam == TEAM_BLUE ) {
 		te = G_TempEntity( ent->parent->s.pos.trBase, EV_GLOBAL_CLIENT_SOUND );
 		te->s.eventParm = G_SoundIndex( "sound/multiplayer/allies/a-affirmative_omw.wav" );
 		te->s.teamNum = ent->parent->s.clientNum;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list