From a1249f5fcb06c0e06fa7f4216986d59ba8771a82 Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Sat, 16 Mar 2019 15:32:45 +0930 Subject: [PATCH] Fix material preview. --- src/meshgenerator.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/meshgenerator.cpp b/src/meshgenerator.cpp index 700cd04f..2d1320ac 100644 --- a/src/meshgenerator.cpp +++ b/src/meshgenerator.cpp @@ -496,9 +496,8 @@ nodemesh::Combiner::Mesh *MeshGenerator::combineComponentMesh(const QString &com if (m_cacheEnabled) { if (m_dirtyComponentIds.find(componentIdString) == m_dirtyComponentIds.end()) { - if (nullptr == componentCache.mesh) - return nullptr; - return new nodemesh::Combiner::Mesh(*componentCache.mesh); + if (nullptr != componentCache.mesh) + return new nodemesh::Combiner::Mesh(*componentCache.mesh); } }