diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index 07c7de7b58..e309ae9a24 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -1377,9 +1377,12 @@ static void execute_looper(thread_db* tdbb, // Ensure the cancellation lock can be triggered - Lock* const lock = transaction->tra_attachment->att_cancel_lock; - if (lock && lock->lck_logical == LCK_none) - LCK_lock(tdbb, lock, LCK_SR, LCK_WAIT); + if (transaction && (transaction != dbb->dbb_sys_trans)) + { + Lock* const lock = transaction->tra_attachment->att_cancel_lock; + if (lock && lock->lck_logical == LCK_none) + LCK_lock(tdbb, lock, LCK_SR, LCK_WAIT); + } // Start a save point