1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Description: fix openbox invokes imlib_free_image when no image is loaded
Author: Grant
Bug-Debian: https://bugs.debian.org/1007147
Origin: upstream
Forwarded: https://bugzilla.icculus.org/show_bug.cgi?id=6447#c0
diff --git a/obrender/image.c b/obrender/image.c
index cffbaf3..5c689c4 100644
--- a/obrender/image.c
+++ b/obrender/image.c
@@ -476,17 +476,18 @@ struct _ImlibLoader
Imlib_Image img;
};
void DestroyImlibLoader(ImlibLoader *loader)
{
if (!loader)
return;
- imlib_free_image();
+ if (loader->img)
+ imlib_free_image();
g_slice_free(ImlibLoader, loader);
}
ImlibLoader* LoadWithImlib(gchar *path,
RrPixel32 **pixel_data,
gint *width,
gint *height)
{
|