shell: Don't remove grab listener if surface was destroyed
diff --git a/src/shell.c b/src/shell.c
index 85395c4..8eb9819 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -231,7 +231,8 @@
 static void
 shell_grab_finish(struct shell_grab *grab)
 {
-	wl_list_remove(&grab->shsurf_destroy_listener.link);
+	if (grab->shsurf)
+		wl_list_remove(&grab->shsurf_destroy_listener.link);
 }
 
 static void