From d049391916e4f418d6057bca9fcbd3d6e35cd15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Fri, 7 Feb 2014 22:57:58 +0100 Subject: Check for background image allocation failure --- Makefile | 2 +- image.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ba8cfe5..03307d8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = git-20140206 +VERSION = git-20140207 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man diff --git a/image.c b/image.c index 62b3c08..3eedf52 100644 --- a/image.c +++ b/image.c @@ -492,7 +492,8 @@ void img_render(img_t *img) imlib_context_set_drawable(win->pm); if (imlib_image_has_alpha()) { - bg = imlib_create_image(dw, dh); + if ((bg = imlib_create_image(dw, dh)) == NULL) + die("could not allocate memory"); imlib_context_set_image(bg); imlib_image_set_has_alpha(0); -- cgit v1.2.3