diff --git a/src/xpra/client/client_window_base.py b/src/xpra/client/client_window_base.py index e7c3c64c02..ce5a8cf58f 100644 --- a/src/xpra/client/client_window_base.py +++ b/src/xpra/client/client_window_base.py @@ -273,10 +273,17 @@ def refresh_all_windows(self): def draw_region(self, x, y, width, height, coding, img_data, rowstride, packet_sequence, options, callbacks): """ Note: this runs from the draw thread (not UI thread) """ - assert self._backing, "window %s has no backing!" % self._id + if not self._backing: + log("draw_region: window %s has no backing, gone?", self._id) + from xpra.client.window_backing_base import fire_paint_callbacks + fire_paint_callbacks(callbacks, False) + return def after_draw_refresh(success): plog("after_draw_refresh(%s) %sx%s at %sx%s encoding=%s, options=%s", success, width, height, x, y, coding, options) - if success and self._backing and self._backing.draw_needs_refresh: + if not success: + return + backing = self._backing + if backing and backing.draw_needs_refresh: self.queue_draw(x, y, width, height) callbacks.append(after_draw_refresh) self._backing.draw_region(x, y, width, height, coding, img_data, rowstride, options, callbacks)