mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-25 14:15:53 +00:00
fix: CacheLoader causes crash when no cache is used (#1853)
If cache is disabled or Clio starts with and empty DB, `loader_` inside cache is not created. So calling `CacheLoader::stop()` or `CacheLoader::wait()` was causing crash.
This commit is contained in:
@@ -130,7 +130,8 @@ public:
|
||||
void
|
||||
stop() noexcept
|
||||
{
|
||||
loader_->stop();
|
||||
if (loader_ != nullptr)
|
||||
loader_->stop();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,7 +140,8 @@ public:
|
||||
void
|
||||
wait() noexcept
|
||||
{
|
||||
loader_->wait();
|
||||
if (loader_ != nullptr)
|
||||
loader_->wait();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user