Skip to content

Commit

Permalink
add NULL check for mpe in Type_LUT8_Write
Browse files Browse the repository at this point in the history
  • Loading branch information
x2018 committed Nov 5, 2023
1 parent 32ded9e commit e69316e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmstypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ cmsBool Type_LUT8_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io,

// Disassemble the LUT into components.
mpe = NewLUT -> Elements;
if (mpe ->Type == cmsSigMatrixElemType) {
if (mpe != NULL && mpe ->Type == cmsSigMatrixElemType) {

if (mpe->InputChannels != 3 || mpe->OutputChannels != 3) return FALSE;
MatMPE = (_cmsStageMatrixData*) mpe ->Data;
Expand Down

0 comments on commit e69316e

Please sign in to comment.