From 3e8e2c2feefa2b058cf93da52160ecab0d0e237e Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 15 Oct 2015 12:45:31 -0700 Subject: [PATCH] Fix incorrect capture in handleLCL --- src/ripple/app/ledger/impl/LedgerConsensusImp.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp b/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp index 60be31e4f..8f156b968 100644 --- a/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp +++ b/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp @@ -653,12 +653,14 @@ void LedgerConsensusImp::handleLCL (uint256 const& lclHash) // Tell the ledger acquire system that we need the consensus ledger mAcquiringLedger = mPrevLedgerHash; - auto& previousHash = mPrevLedgerHash; + + auto app = &app_; + auto hash = mAcquiringLedger; app_.getJobQueue().addJob ( jtADVANCE, "getConsensusLedger", - [&] (Job&) { - app_.getInboundLedgers().acquire( - previousHash, 0, InboundLedger::fcCONSENSUS); + [app, hash] (Job&) { + app->getInboundLedgers().acquire( + hash, 0, InboundLedger::fcCONSENSUS); }); mHaveCorrectLCL = false;