mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:56:25 +02:00
Merge pull request #15108 from sabrina-shanman/crash_physics-fst
(case 21585) Fix crash when FST model used as both graphics and physics model
This commit is contained in:
commit
d068630728
1 changed files with 5 additions and 1 deletions
|
@ -396,7 +396,11 @@ QSharedPointer<Resource> ModelCache::createResource(const QUrl& url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QSharedPointer<Resource> ModelCache::createResourceCopy(const QSharedPointer<Resource>& resource) {
|
QSharedPointer<Resource> ModelCache::createResourceCopy(const QSharedPointer<Resource>& resource) {
|
||||||
return QSharedPointer<Resource>(new GeometryDefinitionResource(*resource.staticCast<GeometryDefinitionResource>()), &Resource::deleter);
|
if (resource->getURL().path().toLower().endsWith(".fst")) {
|
||||||
|
return QSharedPointer<Resource>(new GeometryMappingResource(*resource.staticCast<GeometryMappingResource>()), &Resource::deleter);
|
||||||
|
} else {
|
||||||
|
return QSharedPointer<Resource>(new GeometryDefinitionResource(*resource.staticCast<GeometryDefinitionResource>()), &Resource::deleter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GeometryResource::Pointer ModelCache::getGeometryResource(const QUrl& url,
|
GeometryResource::Pointer ModelCache::getGeometryResource(const QUrl& url,
|
||||||
|
|
Loading…
Reference in a new issue