mirror of
https://github.com/leozide/leocad.git
synced 2026-07-28 04:07:11 +00:00
Fixed loading textures from cached pieces.
This commit is contained in:
@@ -424,6 +424,7 @@ bool lcMesh::FileLoad(lcMemFile& File)
|
||||
FileName[Length] = 0;
|
||||
|
||||
Section.Texture = lcGetPiecesLibrary()->FindTexture(FileName, nullptr, false);
|
||||
Section.Texture->AddRef();
|
||||
}
|
||||
else
|
||||
Section.Texture = nullptr;
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ void PieceInfo::ReleaseMesh()
|
||||
lcMeshSection& Section = mMesh->mLods[LodIdx].Sections[SectionIdx];
|
||||
|
||||
if (Section.Texture)
|
||||
lcGetPiecesLibrary()->ReleaseTexture(Section.Texture);
|
||||
Section.Texture->Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user