diff --git a/agent/php_execute.c b/agent/php_execute.c index df3d86c71..fb8b8cb2f 100644 --- a/agent/php_execute.c +++ b/agent/php_execute.c @@ -891,6 +891,14 @@ static void nr_execute_handle_autoload(const char* filename, return; } + /* + * There is a possibility of the txn being NULL if nr_php_end_txn has been called. + * Verify txn is not null before dereferencing and continuing on. + */ + if (NULL == NRPRG(txn)) { + return; + } + if (NRPRG(txn)->composer_info.autoload_detected) { // autoload already handled return;