* src/alloc.c: call only non-null finalizers

This commit is contained in:
Aurelien Aptel 2016-09-30 14:00:51 +02:00
parent 4b347fe536
commit 9d6026d8ec

View file

@ -6899,7 +6899,8 @@ sweep_misc (void)
else if (mblk->markers[i].m.u_any.type == Lisp_Misc_User_Ptr)
{
struct Lisp_User_Ptr *uptr = &mblk->markers[i].m.u_user_ptr;
uptr->finalizer (uptr->p);
if (uptr->finalizer)
uptr->finalizer (uptr->p);
}
#endif
/* Set the type of the freed object to Lisp_Misc_Free.