From 4911aa58bc9c526d5a973f45406002da73fddbbd Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Tue, 28 Apr 2015 17:02:32 +0200 Subject: [PATCH] Fix Model setURL with delayload Without this condition the model stays in a state where the geometry is downloaded but not referenced That way, another call to setURL with update the geometry reference instead of returning. --- libraries/render-utils/src/Model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index fe82af6b3c..14cb2e5c55 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -1047,7 +1047,7 @@ int Model::getLastFreeJointIndex(int jointIndex) const { void Model::setURL(const QUrl& url, const QUrl& fallback, bool retainCurrent, bool delayLoad) { // don't recreate the geometry if it's the same URL - if (_url == url) { + if (_url == url && _geometry && _geometry->getURL() == url) { return; } _url = url;