summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-02-23 18:30:29 +0200
committerandreykproductengine <akleshchev@productengine.com>2016-02-23 18:30:29 +0200
commit2d41b4fe309c1212c5e40799ae92eff2872c60e6 (patch)
tree5874eecfe1e0bb8b336dd196ee0ef4efdf839e22 /indra/newview/llfloatermodelpreview.cpp
parent35b499a0bec95b5a9f0ce8d85d85d6a3c2ae5283 (diff)
MAINT-6160 Fix for ImporterLegacyMatching crash
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 2255e10678..57d69589d3 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1550,9 +1550,18 @@ void LLModelPreview::rebuildUploadData()
}
instance.mLOD[i] = lod_model;
}
- else if (importerDebug)
+ else
{
- LL_INFOS() << "List of models does not include " << instance.mLabel << LL_ENDL;
+ if (i < LLModel::LOD_HIGH && !lodsReady())
+ {
+ // assign a placeholder from previous LOD until lod generation is complete.
+ // Note: we might need to assign it regardless of conditions like named search does, to prevent crashes.
+ instance.mLOD[i] = instance.mLOD[i + 1];
+ }
+ if (importerDebug)
+ {
+ LL_INFOS() << "List of models does not include " << instance.mLabel << LL_ENDL;
+ }
}
}