Skip to content

Commit

Permalink
Placing a guard for undefined behaviour that appears to trigger sanit…
Browse files Browse the repository at this point in the history
…izers.
  • Loading branch information
FAPG authored and FAPG committed Dec 20, 2024
1 parent 19d4d3b commit 31a07a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ApprovalTests/integrations/catch/Catch2Approvals.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ struct Catch2ApprovalListener : Catch::TestEventListenerBase

virtual void sectionEnded(Catch::SectionStats const& /*sectionStats*/) override
{
currentTest.sections.pop_back();
if (!currentTest.sections.empty())
{
currentTest.sections.pop_back();
}
}
};
//}
Expand Down

0 comments on commit 31a07a7

Please sign in to comment.