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_,
// We are at the node corresponding to the prefix. We are done.
if (!size_) {
bool result = !pipes;
if (!pipes)
pipes = new pipes_t;
if (!pipes) {
pipes = new (std::nothrow) pipes_t;
alloc_assert (pipes);
}
pipes->insert (pipe_);
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