Merge pull request #5119 from sashashura/4508318827937792
Fix unknown write in Assimp::ObjFileMtlImporter::getFloatValuepull/5121/head
commit
bce2fdbbe9
|
@ -252,9 +252,9 @@ void ObjFileMtlImporter::load() {
|
||||||
case 'a': // Anisotropy
|
case 'a': // Anisotropy
|
||||||
{
|
{
|
||||||
++m_DataIt;
|
++m_DataIt;
|
||||||
getFloatValue(m_pModel->mCurrentMaterial->anisotropy);
|
|
||||||
if (m_pModel->mCurrentMaterial != nullptr)
|
if (m_pModel->mCurrentMaterial != nullptr)
|
||||||
m_DataIt = skipLine<DataArrayIt>(m_DataIt, m_DataItEnd, m_uiLine);
|
getFloatValue(m_pModel->mCurrentMaterial->anisotropy);
|
||||||
|
m_DataIt = skipLine<DataArrayIt>(m_DataIt, m_DataItEnd, m_uiLine);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
|
@ -371,6 +371,7 @@ void ObjFileMtlImporter::getTexture() {
|
||||||
if (m_pModel->mCurrentMaterial == nullptr) {
|
if (m_pModel->mCurrentMaterial == nullptr) {
|
||||||
m_pModel->mCurrentMaterial = new ObjFile::Material();
|
m_pModel->mCurrentMaterial = new ObjFile::Material();
|
||||||
m_pModel->mCurrentMaterial->MaterialName.Set("Empty_Material");
|
m_pModel->mCurrentMaterial->MaterialName.Set("Empty_Material");
|
||||||
|
m_pModel->mMaterialMap["Empty_Material"] = m_pModel->mCurrentMaterial;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *pPtr(&(*m_DataIt));
|
const char *pPtr(&(*m_DataIt));
|
||||||
|
|
Loading…
Reference in New Issue