From 6f7ee0bb7ce507902f571f823fe173f07ec7e32f Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Fri, 9 Sep 2016 13:10:18 +0100 Subject: regtools: fix library bug when checking if a reference is valid or not Change-Id: I8adea40d2fa7c1a26f1975d987233249f61af8ef --- utils/regtools/lib/soc_desc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/regtools/lib/soc_desc.cpp b/utils/regtools/lib/soc_desc.cpp index 3238c4de73..ef8aeb5a17 100644 --- a/utils/regtools/lib/soc_desc.cpp +++ b/utils/regtools/lib/soc_desc.cpp @@ -1511,7 +1511,7 @@ node_inst_t::node_inst_t() bool node_inst_t::valid() const { - return is_root() || get() != 0; + return (is_root() && node().valid()) || get() != 0; } void node_inst_t::reset() -- cgit v1.2.3