From 6851d5c4e59640aedf3f23ff5ab6409d153c5ae3 Mon Sep 17 00:00:00 2001 From: Bert Date: Wed, 19 Jan 2011 18:03:32 +0100 Subject: Removed im member from img struct --- image.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'image.c') diff --git a/image.c b/image.c index 65f79de..38d54d4 100644 --- a/image.c +++ b/image.c @@ -40,16 +40,18 @@ void imlib_destroy() { } void img_load(img_t *img, const char *filename) { + Imlib_Image *im; + if (!img || !filename) return; if (imlib_context_get_image()) imlib_free_image(); - if (!(img->im = imlib_load_image(filename))) + if (!(im = imlib_load_image(filename))) DIE("could not open image: %s", filename); - imlib_context_set_image(img->im); + imlib_context_set_image(im); img->w = imlib_image_get_width(); img->h = imlib_image_get_height(); -- cgit v1.2.3-54-g00ecf