rename jp2_write_colr_v2 to opj_jp2_write_colr
[openjpeg.git] / libopenjpeg / tcd.c
index 1fc97a80e3866feac7fa99774558d633a37ef1c0..1476bef4edef58d22fe5bafc120b36629406ee26 100644 (file)
@@ -796,6 +796,12 @@ void tcd_malloc_decode_tile(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp,
                opj_tccp_t *tccp = &tcp->tccps[compno];
                opj_tcd_tilecomp_t *tilec = &tile->comps[compno];
                
+               if (tccp->numresolutions <= 0)
+               {
+                       cp->tileno[tileno] = -1;
+                       return;
+               }
+
                /* border of each tile component (global) */
                tilec->x0 = int_ceildiv(tile->x0, image->comps[compno].dx);
                tilec->y0 = int_ceildiv(tile->y0, image->comps[compno].dy);