summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2009-10-09 04:13:44 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:43 +0000
commitaed5d1f24ab3eb1d24dbf91ae6cc0b14a6c34dea (patch)
tree5842e900ba93fbdd94561698cdbbf92dde6fa461 /src
parent71d9cec2436a62af59b20f53d7d94ad8890b3746 (diff)
* ...And prevent a NULL dereference
Diffstat (limited to 'src')
-rw-r--r--src/game/g_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/g_utils.c b/src/game/g_utils.c
index d90898eb..420557d6 100644
--- a/src/game/g_utils.c
+++ b/src/game/g_utils.c
@@ -995,7 +995,8 @@ qboolean G_AddressParse( const char *str, addr_t *addr, int *netmask )
{
if( *p )
return qfalse;
- *netmask = max;
+ if( netmask )
+ *netmask = max;
}
return qtrue;
}