diff options
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]; //////////////////////////////////////////////////////////////////// |