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
4949
5050RCT_EXPORT_METHOD (startExecutionTrace:(NSString *)name :(NSString *)id) {
5151 IBGExecutionTrace *trace = [IBGAPM startExecutionTraceWithName: name];
52- [traces setObject: trace forKey: id ];
52+ if (trace != nil ) {
53+ [traces setObject: trace forKey: id ];
54+ }
5355}
5456
5557RCT_EXPORT_METHOD (setExecutionTraceAttribute:(NSString *)id :(NSString *)key :(NSString *)value) {
5658 IBGExecutionTrace *trace = [traces objectForKey: id ];
57- [trace setAttributeWithKey: key value: value];
59+ if (trace != nil ) {
60+ [trace setAttributeWithKey: key value: value];
61+ }
5862}
5963
6064RCT_EXPORT_METHOD (endExecutionTrace:(NSString *)id) {
6165 IBGExecutionTrace *trace = [traces objectForKey: id ];
62- [trace end ];
66+ if (trace != nil ) {
67+ [trace end ];
68+ }
6369}
6470
6571RCT_EXPORT_METHOD (startUITrace:(NSString *)name) {
You can’t perform that action at this time.
0 commit comments