Skip to content

Commit

Permalink
Add error message for when topology is not present - needed for the
Browse files Browse the repository at this point in the history
inmask for loop
  • Loading branch information
drroe committed Nov 26, 2024
1 parent 65a2fbe commit e0b9902
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit e0b9902

Please sign in to comment.