diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-09-12 14:16:50 -0600 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-09-12 14:19:29 -0600 |
commit | f7cdfff6a85ce52b1d7c0b5131645fcb77405fe8 (patch) | |
tree | 908af9bf8d1c512e22116cb3afbc89eb5883cc93 /gr-dtv/lib/dvbt/dvbt_map_impl.cc | |
parent | a867a290194228d09ba93f0f46e3a4e4523f5396 (diff) | |
parent | af4323d1e471476efa255e3df745397f7c8a1b71 (diff) |
Merge remote-tracking branch 'upstream/next' into gtk3
Diffstat (limited to 'gr-dtv/lib/dvbt/dvbt_map_impl.cc')
-rw-r--r-- | gr-dtv/lib/dvbt/dvbt_map_impl.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gr-dtv/lib/dvbt/dvbt_map_impl.cc b/gr-dtv/lib/dvbt/dvbt_map_impl.cc index 05f6e7f69b..b2c21da525 100644 --- a/gr-dtv/lib/dvbt/dvbt_map_impl.cc +++ b/gr-dtv/lib/dvbt/dvbt_map_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2015 Free Software Foundation, Inc. + * Copyright 2015,2016 Free Software Foundation, Inc. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +25,6 @@ #include <gnuradio/io_signature.h> #include <complex> #include "dvbt_map_impl.h" -#include <stdio.h> #include <math.h> namespace gr { @@ -59,10 +58,10 @@ namespace gr { d_alpha = config.d_alpha; d_gain = gain * config.d_norm; - d_constellation_points = new gr_complex[d_constellation_size]; + d_constellation_points = new (std::nothrow) gr_complex[d_constellation_size]; if (d_constellation_points == NULL) { - std::cout << "Cannot allocate memory for d_constellation_points" << std::endl; - exit(1); + GR_LOG_FATAL(d_logger, "DVB-T Map, cannot allocate memory for d_constellation_points."); + throw std::bad_alloc(); } make_constellation_points(d_constellation_size, d_step, d_alpha); |