summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 59ff97e7..de0700ed 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1271,7 +1271,11 @@ gentity_t *Build_Item( gentity_t *ent, buildable_t buildable, int distance ) {
built->s.number = built - g_entities;
built->r.contents = CONTENTS_BODY;
built->clipmask = MASK_PLAYERSOLID;
- built->builtBy = ent->client->ps.clientNum;
+
+ if( ent->client )
+ built->builtBy = ent->client->ps.clientNum;
+ else
+ built->builtBy = -1;
G_SetOrigin( built, origin );
VectorCopy( angles, built->s.angles );