From: Aurelien Aptel Date: Fri, 30 Sep 2016 12:00:51 +0000 (+0200) Subject: * src/alloc.c: call only non-null finalizers X-Git-Tag: emacs-26.0.90~1531 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d9ce9c8f4fb9fb96e4ff4fcab7d057031d2b523a;p=emacs.git * src/alloc.c: call only non-null finalizers --- diff --git a/src/alloc.c b/src/alloc.c index 41b2f9e77d2..8dae6bffbd9 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6907,7 +6907,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.