IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7057


Ignore:
Timestamp:
May 3, 2006, 2:37:44 PM (20 years ago)
Author:
drobbin
Message:

fixed seg fault occuring from NULL input image in imageSubset. Moved NULL check back to top of fxn.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageStructManip.c

    r6941 r7057  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-04-21 21:10:01 $
     10 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-05-04 00:37:44 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3333    psS32 inputColOffset;       // offset in bytes to first subset pixel in input row
    3434
     35    if (image == NULL || image->data.V == NULL) {
     36        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     37                PS_ERRORTEXT_psImage_IMAGE_NULL);
     38        return NULL;
     39    }
     40
    3541    if ( col0 < image->col0 || row0 < image->row0 ) {
    3642        //        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
     
    4046                col0, col1-1, row0, row1-1,
    4147                image->numCols-1, image->numRows-1);
    42         return NULL;
    43     }
    44 
    45     if (image == NULL || image->data.V == NULL) {
    46         psError(PS_ERR_BAD_PARAMETER_NULL, true,
    47                 PS_ERRORTEXT_psImage_IMAGE_NULL);
    4848        return NULL;
    4949    }
Note: See TracChangeset for help on using the changeset viewer.