aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorSergey Mironov <mironov@fintech.ru>2023-10-12 13:44:48 +0300
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-11-07 11:45:48 +0400
commitfb93569e422d4f4b5953dd953c92ba7838309972 (patch)
tree93a2889063c59edcfb303b1284e8a14451d97fd0 /ui
parent5ec0898b057971f0e03d2ecc8b62c58b50f4cb99 (diff)
ui: Replacing pointer in function
At the end of the first if we see 'vc->gfx.surface = NULL;', further checking of it is pointless. In the second if, ectx is taken. Found by Linux Verification Center (linuxtesting.org) with SVACE. Co-developed-by: Linux Verification Center <sdl.qemu@linuxtesting.org> Signed-off-by: Sergey Mironov <mironov@fintech.ru> Message-ID: <20231012104448.1251039-1-mironov@fintech.ru> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 2a4c9b84ba..be047a41ad 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1400,7 +1400,7 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque)
eglDestroySurface(qemu_egl_display, vc->gfx.esurface);
vc->gfx.esurface = NULL;
}
- if (vc->gfx.esurface) {
+ if (vc->gfx.ectx) {
eglDestroyContext(qemu_egl_display, vc->gfx.ectx);
vc->gfx.ectx = NULL;
}