[trunk] removed warnings when building tcd.c (Update issue 442)
[openjpeg.git] / src / lib / openjp2 / dwt.c
index e1f8a337d414b70d7e5e8ff6d33dafcf19e52ae7..bea4574257e21d3b69dc3abe31d61e6a4d7be253 100644 (file)
@@ -571,6 +571,7 @@ OPJ_BOOL opj_dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres, DWT1D
        h.mem = (OPJ_INT32*)
        opj_aligned_malloc(opj_dwt_max_resolution(tr, numres) * sizeof(OPJ_INT32));
        if (! h.mem){
+               /* FIXME event manager error callback */
                return OPJ_FALSE;
        }
 
@@ -842,6 +843,10 @@ OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numr
        OPJ_UINT32 w = (OPJ_UINT32)(tilec->x1 - tilec->x0);
 
        h.wavelet = (opj_v4_t*) opj_aligned_malloc((opj_dwt_max_resolution(res, numres)+5) * sizeof(opj_v4_t));
+       if (!h.wavelet) {
+               /* FIXME event manager error callback */
+               return OPJ_FALSE;
+       }
        v.wavelet = h.wavelet;
 
        while( --numres) {