mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 11:52:04 +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();
|
||||
|
||||
auto resource = DependencyManager::get<ModelCache>()->getGeometryResource(url);
|
||||
resource->setLoadPriority(this, _loadingPriority);
|
||||
_renderWatcher.setResource(resource);
|
||||
if (resource) {
|
||||
resource->setLoadPriority(this, _loadingPriority);
|
||||
_renderWatcher.setResource(resource);
|
||||
}
|
||||
onInvalidate();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue