wayland: avoid panic when closing/destroying window
refs: https://github.com/wez/wezterm/issues/4983
This commit is contained in:
1 file changed
+6
@@ -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
|
||||
|
||||
Reference in new issue
Block a user