tests/color-icc-output: assert that dimension is not zero when creating clut
Without that we may crash when trying to create a PTYPE_CLUT ICC profile with dimension zeroed. This would be wrong, so with this change we are basically validating the test case arguments. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
parent
7ea4075d77
commit
722d7f8c3f
|
@ -239,6 +239,8 @@ create_cLUT_from_matrix(cmsContext context_id, const struct lcmsMAT3 *mat, int d
|
||||||
{
|
{
|
||||||
cmsStage *cLUT_stage;
|
cmsStage *cLUT_stage;
|
||||||
|
|
||||||
|
assert(dim_size);
|
||||||
|
|
||||||
cLUT_stage = cmsStageAllocCLutFloat(context_id, dim_size, 3, 3, NULL);
|
cLUT_stage = cmsStageAllocCLutFloat(context_id, dim_size, 3, 3, NULL);
|
||||||
cmsStageSampleCLutFloat(cLUT_stage, sampler_matrix, (void *)mat, 0);
|
cmsStageSampleCLutFloat(cLUT_stage, sampler_matrix, (void *)mat, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue