IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13470


Ignore:
Timestamp:
May 22, 2007, 9:46:46 AM (19 years ago)
Author:
Paul Price
Message:

psPixelsAdd should allocate a pixel list if it is not provided.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psPixels.c

    r13449 r13470  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-05-22 00:14:25 $
     9 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-05-22 19:46:46 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    135135                      float y)
    136136{
    137     PS_ASSERT_PIXELS_NON_NULL(pixels, NULL);
    138 
    139137    if (growth <= 0) {
    140138        growth = PIXELS_DEFAULT_ADD;
    141139    }
    142140
    143     if (pixels->n >= pixels->nalloc) {
     141    if (!pixels) {
     142        pixels = psPixelsAllocEmpty(growth);
     143    } else if (pixels->n >= pixels->nalloc) {
    144144        pixels = psPixelsRealloc(pixels, pixels->nalloc + growth);
    145145    }
Note: See TracChangeset for help on using the changeset viewer.