[krh/weston/next 5/8] compositor: Check if surface creation failed in weston_compositor_fade.

Kristian Høgsberg hoegsberg at gmail.com
Tue Oct 16 08:39:59 PDT 2012


On Fri, Oct 12, 2012 at 12:25:09PM +0200, John Kåre Alsaker wrote:
> ---
>  src/compositor.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index e1411a4..1fb7d9f 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -1099,6 +1099,9 @@ weston_compositor_fade(struct weston_compositor *compositor, float tint)
>  
>  	if (compositor->fade.surface == NULL) {
>  		surface = weston_surface_create(compositor);
> +		if(!surface)
> +			return;

Applied with a space between if and (

Kristian

> +
>  		weston_surface_configure(surface, 0, 0, 8192, 8192);
>  		weston_surface_set_color(surface, 0.0, 0.0, 0.0, 0.0);
>  		wl_list_insert(&compositor->fade_layer.surface_list,
> -- 
> 1.7.12.2
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list