regtools: fix library bug when checking if a reference is valid or not

Change-Id: I8adea40d2fa7c1a26f1975d987233249f61af8ef
This commit is contained in:
Amaury Pouly 2016-09-09 13:10:18 +01:00
parent 7b1bcae879
commit 6f7ee0bb7c

View file

@ -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()