fix crash mode when model late to get collision URL

This commit is contained in:
Andrew Meadows 2015-12-16 15:09:37 -08:00
parent 0c1ae5bb61
commit c14433979b

View file

@ -447,16 +447,14 @@ bool RenderableModelEntityItem::isReadyToComputeShape() {
ShapeType type = getShapeType();
if (type == SHAPE_TYPE_COMPOUND) {
if (!_model) {
if (!_model || _model->getCollisionURL().isEmpty()) {
EntityTreePointer tree = getTree();
if (tree) {
QMetaObject::invokeMethod(tree.get(), "callLoader", Qt::QueuedConnection, Q_ARG(EntityItemID, getID()));
}
return false; // hmm...
return false;
}
assert(!_model->getCollisionURL().isEmpty());
if (_model->getURL().isEmpty()) {
// we need a render geometry with a scale to proceed, so give up.
return false;