diff --git a/gfx/layers/apz/src/InputQueue.cpp b/gfx/layers/apz/src/InputQueue.cpp index 8b10fe998cae..3cc424aafe19 100644 --- a/gfx/layers/apz/src/InputQueue.cpp +++ b/gfx/layers/apz/src/InputQueue.cpp @@ -127,7 +127,12 @@ InputQueue::ReceiveScrollWheelInput(const nsRefPtr& aTar uint64_t* aOutInputBlockId) { WheelBlockState* block = nullptr; if (!mInputBlockQueue.IsEmpty()) { - block = mInputBlockQueue.LastElement().get()->AsWheelBlock(); + block = mInputBlockQueue.LastElement()->AsWheelBlock(); + + // If the block's APZC has been destroyed, request a new block. + if (block && block->GetTargetApzc()->IsDestroyed()) { + block = nullptr; + } } if (!block) {