summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.cc b/gnuradio-core/src/lib/runtime/gr_block.cc
index f3e0ecc91..e0a223135 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.cc
+++ b/gnuradio-core/src/lib/runtime/gr_block.cc
@@ -120,13 +120,25 @@ gr_block::fixed_rate_noutput_to_ninput(int noutput)
gr_uint64
gr_block::n_items_read(unsigned int which_input)
{
- return d_detail->n_items_read(which_input);
+ if(d_detail) {
+ return d_detail->n_items_read(which_input);
+ }
+ else {
+ //throw std::runtime_error("No block_detail associated with block yet");
+ return 0;
+ }
}
gr_uint64
gr_block::n_items_written(unsigned int which_output)
{
- return d_detail->n_items_written(which_output);
+ if(d_detail) {
+ return d_detail->n_items_written(which_output);
+ }
+ else {
+ //throw std::runtime_error("No block_detail associated with block yet");
+ return 0;
+ }
}
void