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

John Kåre Alsaker john.kare.alsaker at gmail.com
Fri Oct 12 03:25:09 PDT 2012


---
 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;
+
 		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



More information about the wayland-devel mailing list