Don't create buffer from NULL pointer

Fixes regression introduced in f58d8ca1bd.
This commit is contained in:
Tim Wiederhake 2011-01-27 01:32:36 +01:00 committed by Kristian Høgsberg
parent 93331ff40a
commit ac5c5e7853

View file

@ -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,