Can anyone tell me why this code crashes? It's copied almost verbatim from
the OpenBabel OBRing API page.
Note: I wasn't sure if the "mol->GetSSSR()" call was needed before calling
mol->GetData("RingList"), so I added it to be sure. The man page wasn't
clear about this.
Thanks,
Craig
mol->GetSSSR();
vector<OBRing*>::iterator ri;
vector<int>::iterator j;
vector<OBRing*> *rlist = (vector<OBRing*>*)mol->GetData("RingList");
for (ri = rlist->begin(); ri != rlist->end(); ++ri) {
for (j = (*ri)->_path.begin(); j != (*ri)->_path.end(); ++j ) {
OBAtom *atom = mol->GetAtom(*j); // <<<<<===== crashes here,
pointer j is NULL
...
}
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel