Changeset 11883

Show
Ignore:
Timestamp:
08/15/07 10:13:09 (1 year ago)
Author:
mloskot
Message:

Manual fix of bug in pymod/gdal_wrap.c:2389 (related to Ticket #1718). Now, osr_proj4.py test shouldn't throw segmentation fault anymore.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/pymod/gdal_wrap.c

    r10645 r11883  
    23872387         
    23882388    err = OSRExportToProj4( _arg0, &wkt ); 
    2389     if( wkt == NULL ) 
    2390         wkt = ""; 
    2391  
    2392     ret = Py_BuildValue( "s", wkt ); 
    2393     OGRFree( wkt ); 
     2389    if( wkt != NULL ) 
     2390    { 
     2391        ret = Py_BuildValue( "s", wkt ); 
     2392        OGRFree( wkt ); 
     2393    } 
     2394    else 
     2395    { 
     2396        ret = Py_BuildValue( "s", ""); 
     2397    } 
     2398 
    23942399    return ret; 
    23952400}