* src/image.c (gui_put_x_image): Avoid memory leak.
This commit is contained in:
@@ -4176,7 +4176,7 @@ static void
|
||||
gui_put_x_image (struct frame *f, Emacs_Pix_Container pimg,
|
||||
Emacs_Pixmap pixmap, int width, int height)
|
||||
{
|
||||
#if defined USE_CAIRO || defined HAVE_HAIKU
|
||||
#if defined USE_CAIRO || defined HAVE_HAIKU || defined HAVE_NS
|
||||
eassert (pimg == pixmap);
|
||||
#elif defined HAVE_X_WINDOWS
|
||||
GC gc;
|
||||
@@ -4188,12 +4188,7 @@ gui_put_x_image (struct frame *f, Emacs_Pix_Container pimg,
|
||||
XFreeGC (FRAME_X_DISPLAY (f), gc);
|
||||
#elif defined HAVE_ANDROID
|
||||
android_put_image (pixmap, pimg);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NS
|
||||
eassert (pimg == pixmap);
|
||||
ns_retain_object (pimg);
|
||||
#endif
|
||||
#endif /* HAVE_ANDROID */
|
||||
}
|
||||
|
||||
/* Thin wrapper for image_create_x_image_and_pixmap_1, so that it matches
|
||||
|
||||
Reference in New Issue
Block a user