From a8a638d5f848f20b1cce1fa3456a0671e9a0675f Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Tue, 31 Jan 2017 17:32:53 -0800 Subject: x300: only remove existing items from zpu_iface_registry in destructor --- host/lib/usrp/x300/x300_impl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'host/lib') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 028058a58..374247fea 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -1022,7 +1022,9 @@ x300_impl::~x300_impl(void) release(mb.zpu_ctrl); //If the process is killed, the entire registry will disappear so we //don't need to worry about unclean shutdowns here. - get_pcie_zpu_iface_registry().pop(mb.get_pri_eth().addr); + if (get_pcie_zpu_iface_registry().has_key(mb.get_pri_eth().addr)) { + get_pcie_zpu_iface_registry().pop(mb.get_pri_eth().addr); + } } } } -- cgit v1.2.3