x11: Add a destroy listener for X11 surfaces
diff --git a/compositor/shell.c b/compositor/shell.c
index 7c35fd0..2dfe95b 100644
--- a/compositor/shell.c
+++ b/compositor/shell.c
@@ -952,6 +952,7 @@
 	if (shell == NULL)
 		return -1;
 
+	memset(shell, 0, sizeof *shell);
 	shell->compositor = ec;
 	shell->shell.activate = activate;
 	shell->shell.lock = lock;