IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23443


Ignore:
Timestamp:
Mar 19, 2009, 3:59:01 PM (17 years ago)
Author:
Paul Price
Message:

Allocators should never return NULL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psImage.c

    r21347 r23443  
    5555
    5656        // drop my entry on my parent's array of children
    57         // lock parent before freeing child : psArrayRemoveDataNoFree is NOT thread safe
    58         psMutexLock (parent);
     57        // lock parent before freeing child : psArrayRemoveDataNoFree is NOT thread safe
     58        psMutexLock (parent);
    5959        psArrayRemoveDataNoFree (parent->children, image);
    60         psMutexUnlock (parent);
     60        psMutexUnlock (parent);
    6161
    6262        // drop my reference to my parent
     
    8787    int rowSize = numCols * elementSize;        // row size in bytes.
    8888
    89     if (numRows < 1) {
    90         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    91                 _("Specified number of rows (%d) or columns (%d) is invalid."),
    92                 numRows, numCols);
    93         return NULL;
    94     }
    95     if (numCols < 1) {
    96         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    97                 _("Specified number of rows (%d) or columns (%d) is invalid."),
    98                 numRows, numCols);
    99         return NULL;
     89    if (numRows < 1 || numCols < 1) {
     90        psAbort(_("Specified number of rows (%d) or columns (%d) is invalid."), numRows, numCols);
    10091    }
    10192
Note: See TracChangeset for help on using the changeset viewer.