Skip to content

Commit

Permalink
Add error message to 'for inmask' when no topology is present (#1116)
Browse files Browse the repository at this point in the history
* Add error message for when topology is not present - needed for the
inmask for loop

* 6.29.8. Revision bump for added error message to 'for inmask' when no
topology is present.
  • Loading branch information
drroe authored Nov 27, 2024
1 parent 65a2fbe commit 2aac8b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/ForLoop_mask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ int ForLoop_mask::SetupFor(CpptrajState& State, ArgList& argIn) {
}
Topology* top = State.DSL().GetTopByIndex( argIn );
if (top != 0) currentTop_ = top;
if (currentTop_ == 0) return 1;
if (currentTop_ == 0) {
mprinterr("Error: No topology found for mask for loop.\n");
return 1;
}
// Get the variable name
if (SetupLoopVar( State.DSL(), argIn.GetStringNext() )) return 1;

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.29.7"
#define CPPTRAJ_INTERNAL_VERSION "V6.29.8"
/// PYTRAJ relies on this
#define CPPTRAJ_VERSION_STRING CPPTRAJ_INTERNAL_VERSION
#endif

0 comments on commit 2aac8b3

Please sign in to comment.