diff options
| author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-02-14 19:15:09 +0400 |
|---|---|---|
| committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-03-13 22:57:39 +0400 |
| commit | 8bb6af6792f50a43807b152e1221e2ac9177f6c4 (patch) | |
| tree | 7f959f56c4daf7ee1737917a1f7577541ea8822c | |
| parent | 284c52eec2d0a1b9c47f06c3eee46762c5fc0915 (diff) | |
| download | focaccia-qemu-8bb6af6792f50a43807b152e1221e2ac9177f6c4.tar.gz focaccia-qemu-8bb6af6792f50a43807b152e1221e2ac9177f6c4.zip | |
ui/dbus: initialize cursor_fb
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>
| -rw-r--r-- | include/ui/egl-helpers.h | 2 | ||||
| -rw-r--r-- | ui/dbus-listener.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index 2fb6e0dd6b..c92dd90e33 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -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, diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 57d4e401db..2dafd6569c 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -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( |