mirror of https://gitee.com/bigwinds/arangodb
Add assertion for nullptr in ClusterComm::instance()
This commit is contained in:
parent
0a31063a35
commit
bc9cb47b5d
|
@ -277,6 +277,12 @@ std::shared_ptr<ClusterComm> ClusterComm::instance() {
|
|||
}
|
||||
}
|
||||
}
|
||||
// We want to achieve by other means that nobody requests a copy of the
|
||||
// shared_ptr when the singleton is already destroyed. Therefore we put
|
||||
// an assertion despite the fact that we have checks for nullptr in
|
||||
// all places that call this method. Assertions have no effect in released
|
||||
// code at the customer's site.
|
||||
TRI_ASSERT(_theInstance != nullptr);
|
||||
return _theInstance;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue