wayland: avoid panic when closing/destroying window

refs: https://github.com/wez/wezterm/issues/4983
This commit is contained in:
Wez Furlong committed 2024-02-08 05:01:55 -07:00
1 parent 4f123a461b
commit 2fee694bcc
1 file changed
+6
+6
View File
@@ -997,6 +997,12 @@ impl WaylandWindowInner {
}
fn do_paint(&mut self) -> anyhow::Result<()> {
if self.window.is_none() {
// We're likely in the middle of closing/destroying
// the window; we've nothing to do here.
return Ok(());
}
if self.frame_callback.is_some() {
// Painting now won't be productive, so skip it but
// remember that we need to be painted so that when