guard against NULL _models

This commit is contained in:
Atlante45 2014-12-09 11:52:20 -08:00
parent ba81030aa1
commit a6f7a1ce15

View file

@ -268,7 +268,10 @@ EntityItemProperties RenderableModelEntityItem::getProperties() const {
bool RenderableModelEntityItem::findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction, bool RenderableModelEntityItem::findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
bool& keepSearching, OctreeElement*& element, float& distance, BoxFace& face, bool& keepSearching, OctreeElement*& element, float& distance, BoxFace& face,
void** intersectedObject, bool precisionPicking) const { void** intersectedObject, bool precisionPicking) const {
if (!_model) {
return true;
}
glm::vec3 originInMeters = origin * (float)TREE_SCALE; glm::vec3 originInMeters = origin * (float)TREE_SCALE;
QString extraInfo; QString extraInfo;
float localDistance; float localDistance;