Skip to content

Commit 6b9b5a0

Browse files
committed
Make test reporter robust against odd callback order (this happens)
1 parent 77f0856 commit 6b9b5a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/SimpleTestReporter.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ struct SimpleTestReporter : public ConsoleReporter
5757
bool res = _assertionStats.assertionResult.isOk();
5858
if (!res)
5959
{
60-
ConsoleReporter::assertionStarting(*mLastAssertInfo);
60+
if (mLastAssertInfo)
61+
{
62+
ConsoleReporter::assertionStarting(*mLastAssertInfo);
63+
}
6164
res = ConsoleReporter::assertionEnded(_assertionStats);
6265
}
6366
mLastAssertInfo.reset();

0 commit comments

Comments
 (0)