summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2019-01-24 10:01:41 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-01-29 09:19:36 -0800
commit8c6becc521f4adc282df90d77e41c13e19622099 (patch)
treeb8b99158449b071f86061a59625ebb74946ae9e0
parentcpack: Fix RPM generation (diff)
downloaduhd-8c6becc521f4adc282df90d77e41c13e19622099.tar.xz
uhd-8c6becc521f4adc282df90d77e41c13e19622099.zip
utils: Add check for gdb_eeprom before accessing
Signed-off-by: michael-west <michael.west@ettus.com>
-rw-r--r--host/utils/uhd_usrp_probe.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp
index 8f60b211f..452753aeb 100644
--- a/host/utils/uhd_usrp_probe.cpp
+++ b/host/utils/uhd_usrp_probe.cpp
@@ -163,7 +163,7 @@ static std::string get_dboard_pp_string(
ss << boost::format("ID: %s") % db_eeprom.id.to_pp_string() << std::endl;
if (not db_eeprom.serial.empty())
ss << boost::format("Serial: %s") % db_eeprom.serial << std::endl;
- if (type == "TX") {
+ if (type == "TX" and tree->exists(path / "gdb_eeprom")) {
usrp::dboard_eeprom_t gdb_eeprom =
tree->access<usrp::dboard_eeprom_t>(path / "gdb_eeprom").get();
if (gdb_eeprom.id != usrp::dboard_id_t::none())