Skip to content

Commit

Permalink
Fix segfault when performing a second run with a reference after refe…
Browse files Browse the repository at this point in the history
…rence structures have been cleared (#1041)

* Ensure the active reference is cleared when all references are cleared.

* Version 6.20.1. Revision bump for fixed segfault when running
'reference' after a clear.
  • Loading branch information
drroe authored Jul 19, 2023
1 parent e7da225 commit 91a65d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/DataSetList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ void DataSetList::ClearRef() {
for (DataListType::const_iterator ds = RefList_.begin(); ds != RefList_.end(); ++ds)
delete *ds;
RefList_.clear();
activeRef_ = 0;
DataList_ = setsToKeep;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Whenever a number that precedes <revision> is incremented, all subsequent
* numbers should be reset to 0.
*/
#define CPPTRAJ_INTERNAL_VERSION "V6.20.0"
#define CPPTRAJ_INTERNAL_VERSION "V6.20.1"
/// PYTRAJ relies on this
#define CPPTRAJ_VERSION_STRING CPPTRAJ_INTERNAL_VERSION
#endif

0 comments on commit 91a65d4

Please sign in to comment.