diff options
author | Daniel Stokes <kupomail@gmail.com> | 2014-04-15 23:44:49 +0400 |
---|---|---|
committer | Daniel Stokes <kupomail@gmail.com> | 2014-04-16 00:06:56 +0400 |
commit | 70f089b6f5b768b7ee0d6bc98d64a202e99fc22f (patch) | |
tree | 9f29cdf3c078431ab9a081a207734b5f11abd6b3 /source | |
parent | 556590fa3a9757f5ee21d923ce38471c343495b7 (diff) |
Fix T39509: Crash when assign an empty as a LoD
Missing check when looking for appropriate LoD
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index f1f12caed19..ec64d09d147 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -759,7 +759,7 @@ void KX_GameObject::UpdateLod(MT_Vector3 &cam_pos) Object *bob = this->GetBlenderObject(); LodLevel *lod = (LodLevel*) bob->lodlevels.first; for (; lod; lod = lod->next, level++) { - if (!lod->source) level--; + if (!lod->source || lod->source->type != OB_MESH) level--; if (!lod->next || lod->next->distance * lod->next->distance > distance2) break; } |