summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-03-06 14:57:23 +0100
committerTor Egge <Tor.Egge@broadpark.no>2020-03-06 14:57:23 +0100
commit838a185f7a8538ea88d85c7033de2087c22a707e (patch)
treea958cb3c8269f6f78113e38885ade59d6b109a72 /searchcore
parent182cca8c02959338825bbc5a03405170af5e28ce (diff)
Handle count being zero in transport latch.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/transport_latch.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/transport_latch.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/transport_latch.cpp
index 96025f5eaad..4a5dfb0a2a5 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/transport_latch.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/transport_latch.cpp
@@ -12,7 +12,11 @@ TransportLatch::TransportLatch(uint32_t cnt)
: _latch(cnt),
_lock(),
_result()
-{}
+{
+ if (cnt == 0u) {
+ _result = std::make_unique<Result>();
+ }
+}
TransportLatch::~TransportLatch() = default;