gui/mapstorage.cc
changeset 1649 95c8cd25a456
parent 1646 2dd083dded66
child 1686 a5b8e0fde2be
     1.1 --- a/gui/mapstorage.cc	Fri Aug 26 07:35:23 2005 +0000
     1.2 +++ b/gui/mapstorage.cc	Fri Aug 26 10:46:51 2005 +0000
     1.3 @@ -245,14 +245,16 @@
     1.4      }
     1.5      else
     1.6      {
     1.7 -      EdgeIt e(graph);
     1.8 -      double max = (*edgemap_storage["id"])[e];
     1.9 -      for (; e != INVALID; ++e)
    1.10 +      double max = std::numeric_limits<double>::min();
    1.11 +      for (EdgeIt e(graph); e != INVALID; ++e)
    1.12        {
    1.13          if ((*edgemap_storage["id"])[e] > max)
    1.14            max = (*edgemap_storage["id"])[e];
    1.15        }
    1.16 -      edgemap_default["id"] = max + 1.0;
    1.17 +      if (max > std::numeric_limits<double>::min())
    1.18 +        edgemap_default["id"] = max + 1.0;
    1.19 +      else
    1.20 +        edgemap_default["id"] = 1.0;
    1.21      }
    1.22    }
    1.23