Fix crash in RCTLog
Reviewed By: tadeuzagallo Differential Revision: D2625795 fb-gh-sync-id: 6983a2dc9259fa1777c05011c2752e9520aa26cd
This commit is contained in:
parent
84d1c17dae
commit
c1ae4780ce
|
@ -225,7 +225,7 @@ void _RCTLogInternal(
|
||||||
NSString *address = [[frameSymbols componentsSeparatedByString:@"0x"][1] componentsSeparatedByString:@" "][0];
|
NSString *address = [[frameSymbols componentsSeparatedByString:@"0x"][1] componentsSeparatedByString:@" "][0];
|
||||||
NSRange addressRange = [frameSymbols rangeOfString:address];
|
NSRange addressRange = [frameSymbols rangeOfString:address];
|
||||||
NSString *methodName = [frameSymbols substringFromIndex:(addressRange.location + addressRange.length + 1)];
|
NSString *methodName = [frameSymbols substringFromIndex:(addressRange.location + addressRange.length + 1)];
|
||||||
if (idx == 1) {
|
if (idx == 1 && fileName) {
|
||||||
NSString *file = [@(fileName) componentsSeparatedByString:@"/"].lastObject;
|
NSString *file = [@(fileName) componentsSeparatedByString:@"/"].lastObject;
|
||||||
[stack addObject:@{@"methodName": methodName, @"file": file, @"lineNumber": @(lineNumber)}];
|
[stack addObject:@{@"methodName": methodName, @"file": file, @"lineNumber": @(lineNumber)}];
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue