diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 777e4f824040f675d026f0785217f2b47f669105..85973f6600a9cb9b9b77d0e3fd2cb8724db26db1 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -538,7 +538,7 @@ void rpcCancelRequest(void *handle) { // signature is used to check if pContext is freed. // pContext may have been released just before app calls the rpcCancelRequest - if (pContext->signature != pContext) return; + if (pContext == NULL || pContext->signature != pContext) return; if (pContext->pConn) { tDebug("%s, app tries to cancel request", pContext->pConn->info);