nsxivd049391
Check for background image allocation failure
+3 −2
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20140206 | |
| 1 | + | VERSION = git-20140207 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -492,7 +492,8 @@ void img_render(img_t *img) | |||
| 492 | 492 | imlib_context_set_drawable(win->pm); | |
| 493 | 493 | ||
| 494 | 494 | if (imlib_image_has_alpha()) { | |
| 495 | − | bg = imlib_create_image(dw, dh); | |
| 495 | + | if ((bg = imlib_create_image(dw, dh)) == NULL) | |
| 496 | + | die("could not allocate memory"); | |
| 496 | 497 | imlib_context_set_image(bg); | |
| 497 | 498 | imlib_image_set_has_alpha(0); | |
| 498 | 499 | ||