From ac5c5e78533d093d9f790564bea114194a387c3a Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Thu, 27 Jan 2011 01:32:36 +0100 Subject: [PATCH] Don't create buffer from NULL pointer Fixes regression introduced in f58d8ca1bd20180bfae3a3a047e8098e0b22b5aa. --- compositor/compositor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compositor/compositor.c b/compositor/compositor.c index 324e73d..ed7656b 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -264,6 +264,8 @@ create_buffer_from_png(struct wlsc_compositor *ec, struct wl_buffer *buffer; pixels = wlsc_load_image(filename, width, height); + if(pixels == NULL) + return NULL; buffer = ec->create_buffer(ec, width, height, &ec->compositor.premultiplied_argb_visual, -- 2.7.4