Skip to content

Commit

Permalink
Merge pull request #408 from x2018/LUT_check
Browse files Browse the repository at this point in the history
check whether xform->Lut is valid in cmsTransform2DeviceLink
Looks great, thank you!
  • Loading branch information
mm2 authored Nov 1, 2023
2 parents bbd6f1b + e2f48fa commit c58f881
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmsvirt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,9 @@ cmsHPROFILE CMSEXPORT cmsTransform2DeviceLink(cmsHTRANSFORM hTransform, cmsFloat

_cmsAssert(hTransform != NULL);

// Check if the pipeline holding is valid
if (xform -> Lut == NULL) return NULL;

// Get the first mpe to check for named color
mpe = cmsPipelineGetPtrToFirstStage(xform ->Lut);

Expand Down

0 comments on commit c58f881

Please sign in to comment.