Merge pull request #13820 from AndrewMeadows/dont-try-physics-for-invalid-models

don't attempt physics with invalid modelURL
This commit is contained in:
Seth Alves 2018-08-14 09:47:37 -07:00 committed by GitHub
commit 41e9c3a2ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -371,7 +371,7 @@ void ModelEntityItem::setAnimationFPS(float value) {
// virtual
bool ModelEntityItem::shouldBePhysical() const {
return !isDead() && getShapeType() != SHAPE_TYPE_NONE;
return !isDead() && getShapeType() != SHAPE_TYPE_NONE && QUrl(_modelURL).isValid();
}
void ModelEntityItem::resizeJointArrays(int newSize) {