From d00c87a2f91ddad7b0eb87f3d58fff08eb86fe9d Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sat, 27 Apr 2024 20:58:35 +0200 Subject: [PATCH] ase/gadget.cc: fix emplace() post condition Signed-off-by: Tim Janik --- ase/gadget.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ase/gadget.cc b/ase/gadget.cc index d120e4a6..165eacae 100644 --- a/ase/gadget.cc +++ b/ase/gadget.cc @@ -263,7 +263,7 @@ GadgetImpl::register_accessor (const char *ot, const char *mt, ptrdiff_t offset, { auto &cml = cml_set(); auto [celement, inserted] = cml.emplace (ot, classtest); - assert_return (celement != nullptr); + assert_return (celement != cml.end()); GadgetClassMemberList *element = const_cast (&*celement); element->members.push_back (new MemberAccessor {mt, offset, std::move (accessfunc), infosp, ev, flags}); //printerr ("%s: %s+%s=%+zd\n", __func__, ot, mt, offset);