From: Eli Zaretskii Date: Fri, 12 Jul 2024 06:39:39 +0000 (+0300) Subject: ; * src/image.c (free_image_cache): Add assertion. (Bug#71929) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59003c77c07c08a165c7a1b9ff1ebe3ce246799d;p=emacs.git ; * src/image.c (free_image_cache): Add assertion. (Bug#71929) (cherry picked from commit ce13eee5ab73e73ffd5d8e67a1dd21fc667ab7e1) --- diff --git a/src/image.c b/src/image.c index 2ee2f3245be..3d761bd48be 100644 --- a/src/image.c +++ b/src/image.c @@ -2306,6 +2306,9 @@ free_image_cache (struct frame *f) struct image_cache *c = FRAME_IMAGE_CACHE (f); ptrdiff_t i; + /* This function assumes the caller already verified that the frame's + image cache is non-NULL. */ + eassert (c); /* Cache should not be referenced by any frame when freed. */ eassert (c->refcount == 0);