mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix a crash if a client requests an order book snapshot before we have a published ledger.
This commit is contained in:
@@ -3492,6 +3492,8 @@ Json::Value RPCHandler::doSubscribe (Json::Value params, LoadType* loadType, App
|
||||
if (bSnapshot)
|
||||
{
|
||||
Ledger::pointer lpLedger = getApp().getLedgerMaster ().getPublishedLedger ();
|
||||
if (lpLedger)
|
||||
{
|
||||
const Json::Value jvMarker = Json::Value (Json::nullValue);
|
||||
|
||||
if (bBoth)
|
||||
@@ -3514,6 +3516,7 @@ Json::Value RPCHandler::doSubscribe (Json::Value params, LoadType* loadType, App
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return jvResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user