Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions IccProfLib/IccCmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8309,6 +8309,11 @@ icStatusCMM CIccCmm::AddXform(CIccProfile *pProfile,
nIntent = icPerceptual;
}

// this must check before creating the Xform, because that can delete the profile
if (pProfile->m_Header.deviceClass == icSigMaterialVisualizationClass) {
bInput = true;
}

CIccXformPtr Xform;

Xform.ptr = CIccXform::Create(pProfile, bInput, nIntent, nInterp, pPcc, nLutType, bUseD2BxB2DxTags, pHintManager);
Expand All @@ -8317,10 +8322,6 @@ icStatusCMM CIccCmm::AddXform(CIccProfile *pProfile,
return icCmmStatBadXform;
}

if (pProfile->m_Header.deviceClass==icSigMaterialVisualizationClass) {
bInput = true;
}

m_nLastSpace = nDstSpace;
m_nLastParentSpace = nParentSpace;
m_nLastIntent = nIntent;
Expand Down
Loading