Fix bug#72255
* src/image.c (struct image_type): Minor grammatical corrections. (image_destroy_x_image): [HAVE_NS]: Do not release Emacs_Pix_Containers, which are identical to Emacs_Pixmaps and consequently always released with the `struct image'. (bug#72255)
This commit is contained in:
parent
05629d3af0
commit
1ee8579eb7
1 changed files with 8 additions and 8 deletions
16
src/image.c
16
src/image.c
|
@ -1328,11 +1328,11 @@ struct image_type
|
|||
image type. Value is true if SPEC is valid. */
|
||||
bool (*valid_p) (Lisp_Object spec);
|
||||
|
||||
/* Load IMG which is used on frame F from information contained in
|
||||
IMG->spec. Value is true if successful. */
|
||||
/* Load IMG which is to be used on frame F from information contained
|
||||
in IMG->spec. Value is true if successful. */
|
||||
bool (*load_img) (struct frame *f, struct image *img);
|
||||
|
||||
/* Free resources of image IMG which is used on frame F. */
|
||||
/* Free such resources of image IMG as are used on frame F. */
|
||||
void (*free_img) (struct frame *f, struct image *img);
|
||||
|
||||
#ifdef WINDOWSNT
|
||||
|
@ -4153,16 +4153,16 @@ image_destroy_x_image (Emacs_Pix_Container pimg)
|
|||
eassert (input_blocked_p ());
|
||||
if (pimg)
|
||||
{
|
||||
#ifdef USE_CAIRO
|
||||
#endif /* USE_CAIRO */
|
||||
#if defined USE_CAIRO || defined HAVE_HAIKU || defined HAVE_NS
|
||||
/* On these systems, Emacs_Pix_Containers always point to the same
|
||||
data as pixmaps in `struct image', and therefore must never be
|
||||
freed separately. */
|
||||
#endif /* USE_CAIRO || HAVE_HAIKU || HAVE_NS */
|
||||
#ifdef HAVE_NTGUI
|
||||
/* Data will be freed by DestroyObject. */
|
||||
pimg->data = NULL;
|
||||
xfree (pimg);
|
||||
#endif /* HAVE_NTGUI */
|
||||
#ifdef HAVE_NS
|
||||
ns_release_object (pimg);
|
||||
#endif /* HAVE_NS */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue