Reviewed-by: Vivek Kasireddy <vivek.kasire...@intel.com>
> -----Original Message----- > From: Qemu-devel <qemu-devel-bounces+vivek.kasireddy=intel....@nongnu.org> On > Behalf Of Dongwon Kim > Sent: Friday, July 02, 2021 5:28 PM > To: qemu-devel@nongnu.org > Cc: Kim, Dongwon <dongwon....@intel.com> > Subject: [PATCH 3/3] ui/gtk: gd_draw_event returns FALSE when no cairo > surface is > bound > > gd_draw_event shouldn't try to repaint if surface does not exist > for the VC. > > Signed-off-by: Dongwon Kim <dongwon....@intel.com> > --- > ui/gtk.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ui/gtk.c b/ui/gtk.c > index bfb95f3b4b..0a38deedc7 100644 > --- a/ui/gtk.c > +++ b/ui/gtk.c > @@ -756,6 +756,9 @@ static gboolean gd_draw_event(GtkWidget *widget, cairo_t > *cr, > void *opaque) > if (!vc->gfx.ds) { > return FALSE; > } > + if (!vc->gfx.surface) { > + return FALSE; > + } > > vc->gfx.dcl.update_interval = > gd_monitor_update_interval(vc->window ? vc->window : s->window); > -- > 2.17.1 >