diff --git a/modules/highgui/src/grfmt_jpeg2000.cpp b/modules/highgui/src/grfmt_jpeg2000.cpp index f1908356e..d9080e5d4 100644 --- a/modules/highgui/src/grfmt_jpeg2000.cpp +++ b/modules/highgui/src/grfmt_jpeg2000.cpp @@ -212,7 +212,7 @@ bool Jpeg2KDecoder::readData( Mat& img ) cmptlut[0] = jas_image_getcmptbytype( image, JAS_IMAGE_CT_RGB_B ); cmptlut[1] = jas_image_getcmptbytype( image, JAS_IMAGE_CT_RGB_G ); cmptlut[2] = jas_image_getcmptbytype( image, JAS_IMAGE_CT_RGB_R ); - if( cmptlut[0] < 0 || cmptlut[1] < 0 || cmptlut[0] < 0 ) + if( cmptlut[0] < 0 || cmptlut[1] < 0 || cmptlut[2] < 0 ) result = false; ncmpts = 3; }