Revision: 9263
http://mpqc.svn.sourceforge.net/mpqc/?rev=9263&view=rev
Author: evaleev
Date: 2009-10-07 17:51:22 +0000 (Wed, 07 Oct 2009)
Log Message:
-----------
fixed bug in Molecule::symmetrize() caused by exception thrown when trying to construct a std::string by providing a null pointer.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/molecule/molecule.cc
Modified: trunk/mpqc/src/lib/chemistry/molecule/molecule.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/molecule/molecule.cc 2009-10-07 15:45:42 UTC (rev 9262)
+++ trunk/mpqc/src/lib/chemistry/molecule/molecule.cc 2009-10-07 17:51:22 UTC (rev 9263)
@@ -957,7 +957,9 @@
int atom = newmol->atom_at_position(np.data(), tol);
if (atom < 0) {
- newmol->add_atom(Z_[i],np[0],np[1],np[2],label(i));
+ const char* c_lbl = label(i);
+ const std::string lbl = (c_lbl ? c_lbl : "");
+ newmol->add_atom(Z_[i],np[0],np[1],np[2],lbl);
}
else {
if (Z(i) != newmol->Z(atom)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|