Skip to content

Commit

Permalink
[GRASS] made ready for Vect_new_map_struct
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Aug 26, 2015
1 parent 18a797c commit 0fb356e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/providers/grass/qgsgrass.cpp
Expand Up @@ -2453,7 +2453,20 @@ struct Map_info *QgsGrass::vectNewMapStruct()
// -> allocate more space on all systems

// TODO: replace by Vect_new_map_struct once it appears in GRASS
// Patch supplied: https://trac.osgeo.org/grass/ticket/2729
#if GRASS_VERSION_MAJOR > 999
G_TRY
{
return Vect_new_map_struct();
}
G_CATCH( QgsGrass::Exception &e ) // out of memory
{
warning( e );
return 0;
}
#else
return ( struct Map_info* ) qgsMalloc( 2*sizeof( struct Map_info ) );
#endif
}

void QgsGrass::vectDestroyMapStruct( struct Map_info *map )
Expand Down

0 comments on commit 0fb356e

Please sign in to comment.