mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 23:03:12 +02:00
check for valid resource pointer before use
This commit is contained in:
parent
8d3285f733
commit
17b6cf29df
1 changed files with 4 additions and 2 deletions
|
@ -810,8 +810,10 @@ void Model::setURL(const QUrl& url) {
|
||||||
deleteGeometry();
|
deleteGeometry();
|
||||||
|
|
||||||
auto resource = DependencyManager::get<ModelCache>()->getGeometryResource(url);
|
auto resource = DependencyManager::get<ModelCache>()->getGeometryResource(url);
|
||||||
resource->setLoadPriority(this, _loadingPriority);
|
if (resource) {
|
||||||
_renderWatcher.setResource(resource);
|
resource->setLoadPriority(this, _loadingPriority);
|
||||||
|
_renderWatcher.setResource(resource);
|
||||||
|
}
|
||||||
onInvalidate();
|
onInvalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue