File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -49,17 +49,23 @@ - (id) init
49
49
50
50
RCT_EXPORT_METHOD (startExecutionTrace:(NSString *)name :(NSString *)id) {
51
51
IBGExecutionTrace *trace = [IBGAPM startExecutionTraceWithName: name];
52
- [traces setObject: trace forKey: id ];
52
+ if (trace != nil ) {
53
+ [traces setObject: trace forKey: id ];
54
+ }
53
55
}
54
56
55
57
RCT_EXPORT_METHOD (setExecutionTraceAttribute:(NSString *)id :(NSString *)key :(NSString *)value) {
56
58
IBGExecutionTrace *trace = [traces objectForKey: id ];
57
- [trace setAttributeWithKey: key value: value];
59
+ if (trace != nil ) {
60
+ [trace setAttributeWithKey: key value: value];
61
+ }
58
62
}
59
63
60
64
RCT_EXPORT_METHOD (endExecutionTrace:(NSString *)id) {
61
65
IBGExecutionTrace *trace = [traces objectForKey: id ];
62
- [trace end ];
66
+ if (trace != nil ) {
67
+ [trace end ];
68
+ }
63
69
}
64
70
65
71
RCT_EXPORT_METHOD (startUITrace:(NSString *)name) {
You can’t perform that action at this time.
0 commit comments