mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:51:20 +02:00
fix crash mode when model late to get collision URL
This commit is contained in:
parent
0c1ae5bb61
commit
c14433979b
1 changed files with 8 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue