Skip to content
Snippets Groups Projects
Commit 8d56fbee authored by Marco Biasini's avatar Marco Biasini
Browse files

protect against empty models

That's certainly better than segfaulting
parent 8f9de71c
Branches
Tags
No related merge requests found
......@@ -390,6 +390,9 @@ bool IsStandardResidue(String rn)
GlobalRDMap CreateDistanceList(const EntityView& ref,Real max_dist)
{
GlobalRDMap dist_list;
if (!ref.GetChainCount()) {
return dist_list;
}
ResidueViewList ref_residues=ref.GetChainList()[0].GetResidueList();
for (ResidueViewList::iterator i=ref_residues.begin(), e=ref_residues.end(); i!=e; ++i) {
if (IsStandardResidue(i->GetName())) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment