Skip to content

Commit

Permalink
[GRASS] always alloc more spece for Map_info structure
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Aug 26, 2015
1 parent 40828e8 commit 3de84a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/providers/grass/qgsgrass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2447,12 +2447,13 @@ struct Map_info *QgsGrass::vectNewMapStruct()
// In OSGeo4W there is GRASS compiled by MinGW while QGIS compiled by MSVC, the compilers
// may have different sizes of types, see issue #13002. Because there is no Vect_new_map_struct (GRASS 7.0.0, July 2015)
// the structure is allocated here using doubled (should be enough) space.

// The same problem was also reported for QGIS 2.11-master compiled on Xubuntu 14.04 LTS
// using GRASS 7.0.1-2~ubuntu14.04.1 from https://launchpad.net/~grass/+archive/ubuntu/grass-stable
// -> allocate more space on all systems

// TODO: replace by Vect_new_map_struct once it appears in GRASS
#ifdef Q_OS_WIN
return ( struct Map_info* ) qgsMalloc( 2*sizeof( struct Map_info ) );
#else
return ( struct Map_info* ) qgsMalloc( sizeof( struct Map_info ) );
#endif
}

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

0 comments on commit 3de84a6

Please sign in to comment.