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.