Commit 692648de authored by Martin Hurton's avatar Martin Hurton

mtrie: Do not throw exception on allocation failure

parent e471e5b4
...@@ -72,8 +72,10 @@ bool zmq::mtrie_t::add_helper (unsigned char *prefix_, size_t size_, ...@@ -72,8 +72,10 @@ bool zmq::mtrie_t::add_helper (unsigned char *prefix_, size_t size_,
// We are at the node corresponding to the prefix. We are done. // We are at the node corresponding to the prefix. We are done.
if (!size_) { if (!size_) {
bool result = !pipes; bool result = !pipes;
if (!pipes) if (!pipes) {
pipes = new pipes_t; pipes = new (std::nothrow) pipes_t;
alloc_assert (pipes);
}
pipes->insert (pipe_); pipes->insert (pipe_);
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment