[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/4] ui/gtk: gd_draw_event returns FALSE when no cairo surface is
From: |
Dongwon Kim |
Subject: |
[PATCH 4/4] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound |
Date: |
Tue, 2 Nov 2021 15:36:32 -0700 |
gd_draw_event shouldn't try to repaint if surface does not exist
for the VC.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
ui/gtk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index 8da673c18c..d2892ea6b4 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -778,6 +778,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.30.2