Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Jul 12, 2023
1 parent 80a0502 commit 3c92860
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/src/FabricPrepareRenderResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ acquireFabricMeshes(const CesiumGltf::Model& model, const std::vector<MeshInfo>&
fabricMesh.material = fabricMaterial;
fabricMesh.materialInfo = materialInfo;

if (fabricMaterial->getMaterialDefinition().hasBaseColorTexture()) {
if (fabricMaterial->getMaterialDefinition().hasBaseColorTexture() &&
materialInfo.baseColorTexture.has_value()) {
const auto fabricTexture = fabricResourceManager.acquireTexture();
fabricMesh.baseColorTexture = fabricTexture;
}
Expand Down

0 comments on commit 3c92860

Please sign in to comment.