Skip to content

Commit

Permalink
checking file name for null C string
Browse files Browse the repository at this point in the history
  • Loading branch information
kylealanhale committed May 1, 2015
1 parent 0116d45 commit e6732dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Bundle/GoogleTests.mm
Expand Up @@ -45,7 +45,8 @@ void OnTestPartResult(const TestPartResult& test_part_result) {
return;

int lineNumber = test_part_result.line_number();
NSString *path = [@(test_part_result.file_name()) stringByStandardizingPath];
const char *fileName = test_part_result.file_name();
NSString *path = fileName ? [@(fileName) stringByStandardizingPath] : nil;
NSString *description = @(test_part_result.message());
[_testCase recordFailureWithDescription:description
inFile:path
Expand Down

0 comments on commit e6732dc

Please sign in to comment.