diff options
author | Bert Münnich <ber.t@posteo.de> | 2014-02-07 22:57:58 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2014-02-07 22:57:58 +0100 |
commit | d049391916e4f418d6057bca9fcbd3d6e35cd15a (patch) | |
tree | 458e67d6bb15ce6cb7aee7069f584f46f3a33226 | |
parent | 4fde8c8cbc6a019f1519a086e14ca79291439a48 (diff) |
Check for background image allocation failure
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | image.c | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ -VERSION = git-20140206 +VERSION = git-20140207 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man @@ -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); |