[PATCH weston] shell: Another NULL check.

Scott Moreau oreaus at gmail.com
Sat May 12 23:50:24 PDT 2012


---
 src/shell.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index a44074d..7016bfe 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2170,9 +2170,14 @@ static void
 shell_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy)
 {
 	struct shell_surface *shsurf = get_shell_surface(es);
-	struct desktop_shell *shell = shsurf->shell;
+	struct desktop_shell *shell;
 	int type_changed = 0;
 
+	if (!shsurf)
+		return;
+
+	shell = shsurf->shell;
+
 	if (shsurf->next_type != SHELL_SURFACE_NONE &&
 	    shsurf->type != shsurf->next_type) {
 		set_surface_type(shsurf);
-- 
1.7.7.6



More information about the wayland-devel mailing list