Skip to content

Commit

Permalink
chore: check for NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
bduranleau-nr committed Jun 21, 2024
1 parent eaff30f commit 59e8ec2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions agent/lib_mongodb.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,11 @@ NR_PHP_WRAPPER_END

NR_PHP_WRAPPER(nr_mongodb_operation_before) {
(void)wraprec;
nr_segment_t* segment;
nr_segment_t* segment = NULL;
segment = nr_segment_start(NRPRG(txn), NULL, NULL);
segment->wraprec = auto_segment->wraprec;
if (NULL != segment) {
segment->wraprec = auto_segment->wraprec;
}
}
NR_PHP_WRAPPER_END

Expand Down

0 comments on commit 59e8ec2

Please sign in to comment.