Skip to content
Permalink
Browse files

[GRASS] made ready for Vect_new_map_struct

  • Loading branch information
blazek committed Aug 26, 2015
1 parent 18a797c commit 0fb356e822b7c5a19bea2e4eafe02d0061e332fe
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/providers/grass/qgsgrass.cpp
@@ -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 )

0 comments on commit 0fb356e

Please sign in to comment.
You can’t perform that action at this time.