[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/3] ui/gtk: gd_draw_event returns FALSE when no cairo surface is
From: |
Dongwon Kim |
Subject: |
[PATCH 3/3] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound |
Date: |
Fri, 2 Jul 2021 17:28:09 -0700 |
gd_draw_event shouldn't try to repaint if surface does not exist
for the VC.
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 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