Skip to content

Commit

Permalink
fixed segfault when splitting zero-size AGs
Browse files Browse the repository at this point in the history
  • Loading branch information
agrossfield committed Mar 1, 2024
1 parent 8cf3fff commit 7de8928
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/AtomicGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,9 @@ namespace loos {
std::vector<AtomicGroup> AtomicGroup::splitByResidue(void) const {
std::vector<AtomicGroup> residues;

if (size() == 0) {
return(residues);
}
int curr_resid = atoms[0]->resid();
std::string curr_segid = atoms[0]->segid();

Expand Down

0 comments on commit 7de8928

Please sign in to comment.