diff options
Diffstat (limited to 'gnuradio-runtime/lib/block_registry.cc')
-rw-r--r-- | gnuradio-runtime/lib/block_registry.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/block_registry.cc b/gnuradio-runtime/lib/block_registry.cc index 0a426f18b2..4c3f20ba2b 100644 --- a/gnuradio-runtime/lib/block_registry.cc +++ b/gnuradio-runtime/lib/block_registry.cc @@ -120,10 +120,14 @@ void block_registry::notify_blk(std::string blk) gr::thread::scoped_lock guard(d_mutex); if (primitive_map.find(blk) == primitive_map.end()) { - return; + throw std::runtime_error("block notify failed: block not found!"); } - if (primitive_map[blk]->detail().get()) + if (primitive_map[blk]->detail().get()) { primitive_map[blk]->detail()->d_tpb.notify_msg(); + } else { + // not having block detail is not necessarily a problem; this will happen when + // publishing a message to a block that exists but has not yet been started + } } } /* namespace gr */ |