[Lemon-commits] [lemon_svn] deba: r2734 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:54:50 CET 2006
Author: deba
Date: Tue May 9 13:25:34 2006
New Revision: 2734
Modified:
hugo/trunk/lemon/bellman_ford.h
Log:
Bug fix
Do not delete the not constructed map
Modified: hugo/trunk/lemon/bellman_ford.h
==============================================================================
--- hugo/trunk/lemon/bellman_ford.h (original)
+++ hugo/trunk/lemon/bellman_ford.h Tue May 9 13:25:34 2006
@@ -326,13 +326,13 @@
BellmanFord(const Graph& _graph, const LengthMap& _length) :
graph(&_graph), length(&_length),
_pred(0), local_pred(false),
- _dist(0), local_dist(false) {}
+ _dist(0), local_dist(false), _mask(0) {}
///Destructor.
~BellmanFord() {
if(local_pred) delete _pred;
if(local_dist) delete _dist;
- delete _mask;
+ if(_mask) delete _mask;
}
/// \brief Sets the length map.
More information about the Lemon-commits
mailing list