mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Avoid a segfault in CoordGen when a double bond has stereo spec but no stereo atoms (#8415)
* avoid a segfault in CoordGen when a double bond has stereo spec but no stereo atoms * changes in response to review --------- Co-authored-by: ptosco <paolo.tosco@novartis.com>
This commit is contained in:
4
External/CoordGen/CoordGen.h
vendored
4
External/CoordGen/CoordGen.h
vendored
@@ -154,8 +154,10 @@ unsigned int addCoords(T &mol, const CoordGenParams *params = nullptr) {
|
||||
auto obnd = *bndit;
|
||||
if (obnd->getBondType() != Bond::DOUBLE ||
|
||||
obnd->getStereo() <= Bond::STEREOANY ||
|
||||
obnd->getStereo() > Bond::STEREOTRANS)
|
||||
obnd->getStereo() > Bond::STEREOTRANS ||
|
||||
obnd->getStereoAtoms().size() < 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
sketcherMinimizerBondStereoInfo sinfo;
|
||||
sinfo.atom1 = ats[obnd->getStereoAtoms()[0]];
|
||||
|
||||
Reference in New Issue
Block a user