Skip to content

Commit 376d90c

Browse files
author
Kai Song
committed
Resolve a crash when assign the 0 to expectedFulfillmentCount
1 parent ea7c04a commit 376d90c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

IdentityCore/tests/automation/ui_tests_lib/MSIDBaseUITest.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ - (NSArray *)loadTestAccountRequest:(MSIDAutomationBaseApiRequest *)accountReque
436436
XCTAssertTrue(results.count >= 1);
437437

438438
XCTestExpectation *passwordLoadExpecation = [self expectationWithDescription:@"Get password"];
439-
passwordLoadExpecation.expectedFulfillmentCount = results.count;
439+
if (results && results.count > 0)
440+
{
441+
passwordLoadExpecation.expectedFulfillmentCount = results.count;
442+
}
440443

441444
for (MSIDTestAutomationAccount *account in results)
442445
{

0 commit comments

Comments
 (0)