Fix crash in RCTLog

Reviewed By: tadeuzagallo

Differential Revision: D2625795

fb-gh-sync-id: 6983a2dc9259fa1777c05011c2752e9520aa26cd
This commit is contained in:
Pieter De Baets 2015-11-06 06:35:26 -08:00 committed by facebook-github-bot-6
parent 84d1c17dae
commit c1ae4780ce
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ void _RCTLogInternal(
NSString *address = [[frameSymbols componentsSeparatedByString:@"0x"][1] componentsSeparatedByString:@" "][0];
NSRange addressRange = [frameSymbols rangeOfString:address];
NSString *methodName = [frameSymbols substringFromIndex:(addressRange.location + addressRange.length + 1)];
if (idx == 1) {
if (idx == 1 && fileName) {
NSString *file = [@(fileName) componentsSeparatedByString:@"/"].lastObject;
[stack addObject:@{@"methodName": methodName, @"file": file, @"lineNumber": @(lineNumber)}];
} else {