History

Check for null pointer

luiscuenca committed 8 years ago

Commit 60758de1 parent 6095a3b1 file · +2 −1Browse files

Showing the changes to libraries/render-utils/src/CauterizedModel.cpp (1 of 1 file). Show all

Unified · Split

libraries/render-utils/src/CauterizedModel.cpp+2−1
@@ -87,7 +87,8 @@ void CauterizedModel::createVisibleRenderItemSet() { · 86 unmodified lines
87 for (int partIndex = 0; partIndex < numParts; partIndex++) {87 for (int partIndex = 0; partIndex < numParts; partIndex++) {
88 auto ptr = std::make_shared<CauterizedMeshPartPayload>(shared_from_this(), i, partIndex, shapeID, transform, offset);88 auto ptr = std::make_shared<CauterizedMeshPartPayload>(shared_from_this(), i, partIndex, shapeID, transform, offset);
89 _modelMeshRenderItems << std::static_pointer_cast<ModelMeshPartPayload>(ptr);89 _modelMeshRenderItems << std::static_pointer_cast<ModelMeshPartPayload>(ptr);
90 _modelMeshMaterialNames.push_back(getGeometry()->getShapeMaterial(shapeID)->getName());90 auto material = getGeometry()->getShapeMaterial(shapeID);
91 _modelMeshMaterialNames.push_back(material ? material->getName() : "");
91 _modelMeshRenderItemShapes.emplace_back(ShapeInfo{ (int)i });92 _modelMeshRenderItemShapes.emplace_back(ShapeInfo{ (int)i });
92 shapeID++;93 shapeID++;
93 }94 }