[03/11] ir: add_decl_to_scope shouldn't abort on nullptr scopes
Commit Message
From: Dodji Seketeli <dodji@redhat.com>
* src/abg-ir.cc (add_decl_to_scope): Do not abort on an empty
scope.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-ir.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -8415,7 +8415,8 @@ scope_decl::~scope_decl()
decl_base_sptr
add_decl_to_scope(decl_base_sptr decl, scope_decl* scope)
{
- ABG_ASSERT(scope);
+ if (!scope)
+ return decl;
if (scope && decl && !decl->get_scope())
decl = scope->add_member_decl(decl);