[PATCH] Don't create buffer from NULL pointer
Tim Wiederhake
twied at gmx.net
Wed Jan 26 16:32:36 PST 2011
Fixes regression introduced in f58d8ca1bd20180bfae3a3a047e8098e0b22b5aa.
---
compositor/compositor.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/compositor/compositor.c b/compositor/compositor.c
index 746a729..a0cd0d4 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,
--
1.7.2.3
More information about the wayland-devel
mailing list