diff options
author | enneract <trem.redman@gmail.com> | 2014-04-25 15:47:45 +0200 |
---|---|---|
committer | enneract <trem.redman@gmail.com> | 2014-04-25 15:47:45 +0200 |
commit | 267a7f3eb261f8e9ad63570a2f39e18fc2a91b1c (patch) | |
tree | 5e77c3a3915a999d116c1e6e16f387150f8b3b25 | |
parent | e9d34dc0964c518512b71f9f354b7206f6f84109 (diff) |
Fix BG_Buildable dereferencing a null pointer if cuboidSize is NULL and buildable is a cuboid.
-rw-r--r-- | src/game/bg_misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index ca443f2..ee850d6 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -991,7 +991,7 @@ const buildableAttributes_t *BG_Buildable( buildable_t buildable, const vec3_t c else return &nullBuildable; - if( attr->cuboid ) + if( attr->cuboid && cuboidSize ) { volume = cuboidSize[ 0 ] * cuboidSize[ 1 ] * cuboidSize[ 2 ] * 5.5306341e-5; // NOTE: cubic quake units -> cubic meters ( 1qu = 0.0381m ) memcpy( &cuboidAttr, attr, sizeof( buildableAttributes_t ) ); |