ui/dbus: initialize cursor_fb
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 14 Feb 2023 15:15:09 +0000 (19:15 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 13 Mar 2023 18:57:39 +0000 (22:57 +0400)
Or else, we may randomly destroy some textures..

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
include/ui/egl-helpers.h
ui/dbus-listener.c

index 2fb6e0dd6b874afa2f70cc631d6fe314f45c090c..c92dd90e33a0521426f6036d0685cd6c840c0e39 100644 (file)
@@ -22,6 +22,8 @@ typedef struct egl_fb {
     QemuDmaBuf *dmabuf;
 } egl_fb;
 
+#define EGL_FB_INIT { 0, }
+
 void egl_fb_destroy(egl_fb *fb);
 void egl_fb_setup_default(egl_fb *fb, int width, int height);
 void egl_fb_setup_for_tex(egl_fb *fb, int width, int height,
index 57d4e401db5b837403592ca6c994b67ea540d3a2..2dafd6569c8bf7947ed843aa80dcaa7baa03f4e4 100644 (file)
@@ -149,7 +149,7 @@ static void dbus_cursor_dmabuf(DisplayChangeListener *dcl,
     DBusDisplayListener *ddl = container_of(dcl, DBusDisplayListener, dcl);
     DisplaySurface *ds;
     GVariant *v_data = NULL;
-    egl_fb cursor_fb;
+    egl_fb cursor_fb = EGL_FB_INIT;
 
     if (!dmabuf) {
         qemu_dbus_display1_listener_call_mouse_set(