Until this commitment gui gave us segmentation fault in the case when no element was on graph_displayer_canvas and a map to visualize by a property has been changed.
authorhegyi
Sun, 07 Aug 2005 22:14:59 +0000
changeset 1617c17d61f77319
parent 1616 78704393218d
child 1618 e455fafbd663
Until this commitment gui gave us segmentation fault in the case when no element was on graph_displayer_canvas and a map to visualize by a property has been changed.
gui/mapstorage.cc
     1.1 --- a/gui/mapstorage.cc	Sun Aug 07 18:06:41 2005 +0000
     1.2 +++ b/gui/mapstorage.cc	Sun Aug 07 22:14:59 2005 +0000
     1.3 @@ -74,7 +74,15 @@
     1.4  double MapStorage::minOfNodeMap(const std::string & name)
     1.5  {
     1.6    NodeIt j(graph);
     1.7 -  double min=(*nodemap_storage[name])[j];
     1.8 +  double min;
     1.9 +  if(j!=INVALID)
    1.10 +    {
    1.11 +      min=(*nodemap_storage[name])[j];
    1.12 +    }
    1.13 +  else
    1.14 +    {
    1.15 +      min=0;
    1.16 +    }
    1.17    for (; j!=INVALID; ++j)
    1.18    {
    1.19      if( (*nodemap_storage[name])[j]<min )
    1.20 @@ -88,7 +96,15 @@
    1.21  double MapStorage::minOfEdgeMap(const std::string & name)
    1.22  {
    1.23    EdgeIt j(graph);
    1.24 -  double min=(*edgemap_storage[name])[j];
    1.25 +  double min;
    1.26 +  if(j!=INVALID)
    1.27 +    {
    1.28 +      min=(*edgemap_storage[name])[j];
    1.29 +    }
    1.30 +  else
    1.31 +    {
    1.32 +      min=0;
    1.33 +    }
    1.34    for (EdgeIt j(graph); j!=INVALID; ++j)
    1.35    {
    1.36      if( (*edgemap_storage[name])[j]<min )