ir: Fix a potential crash in canonicalize_types
I noticed crashes in canonicalize_types when it deals with nullptr types. Fixed thus. * src/abg-ir-priv.h (canonicalize_types): Avoid crashing when de-referencing an iterator to a nullptr type. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
076985bbe9
commit
9d14151e15
|
@ -1620,7 +1620,7 @@ canonicalize_types(const input_iterator& begin,
|
|||
// First, let's compute the canonical type of this type.
|
||||
for (t = begin,i = 0; t != end; ++t, ++i)
|
||||
{
|
||||
if (deref(t)->get_environment().priv_->do_log())
|
||||
if (deref(t) && deref(t)->get_environment().priv_->do_log())
|
||||
std::cerr << "#" << std::dec << i << " ";
|
||||
|
||||
canonicalize(deref(t));
|
||||
|
|
Loading…
Reference in New Issue