Skip to content

Commit 86c69fd

Browse files
authored
Early exit if no mocks (microsoft#448)
1 parent 9b0cd3a commit 86c69fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/Mock/lhc_mock.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ HC_MOCK_CALL* GetMatchingMock(
6262
return nullptr;
6363
}
6464

65+
if (httpSingleton->m_mocks.size() == 0)
66+
{
67+
return nullptr;
68+
}
69+
6570
http_internal_vector<HC_MOCK_CALL*> mocks;
6671
HC_MOCK_CALL* lastMatchingMock = nullptr;
6772
HC_MOCK_CALL* matchingMock = nullptr;

0 commit comments

Comments
 (0)