diff options
author | Martin Braun <martin.braun@ettus.com> | 2014-03-13 17:38:16 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-03-17 17:53:45 +0100 |
commit | cbd800a252400bd0372e00974a02ed9d85e9d821 (patch) | |
tree | 8f7fea526b642bf83d4772a2cdfa4df90c4c59d1 /host/lib/usrp/x300/x300_impl.cpp | |
parent | 0386a47c431c87aebbf37678315b785284dbe3b9 (diff) | |
download | uhd-cbd800a252400bd0372e00974a02ed9d85e9d821.tar.gz uhd-cbd800a252400bd0372e00974a02ed9d85e9d821.tar.bz2 uhd-cbd800a252400bd0372e00974a02ed9d85e9d821.zip |
uhd: Addressed Balints and Bens comments for subdev addressing
Diffstat (limited to 'host/lib/usrp/x300/x300_impl.cpp')
-rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 22f607baa..e6dfa3bc1 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -829,8 +829,9 @@ static void check_adc(wb_iface::sptr iface, const boost::uint32_t val) void x300_impl::setup_radio(const size_t mb_i, const std::string &slot_name) { const fs_path mb_path = "/mboards/"+boost::lexical_cast<std::string>(mb_i); - const size_t radio_index = _mb[mb_i].get_radio_index(slot_name); + UHD_ASSERT_THROW(mb_i < _mb.size()); mboard_members_t &mb = _mb[mb_i]; + const size_t radio_index = mb.get_radio_index(slot_name); radio_perifs_t &perif = mb.radio_perifs[radio_index]; //////////////////////////////////////////////////////////////////// |