mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 06:32:44 +00:00
Warn on invalid surface_id at qxl_spice_destroy_surface_wait()
Fixes: https://gitlab.freedesktop.org/spice/spice/-/issues/83 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
parent
7e56fc9fd9
commit
f0eb8cc57d
@ -267,6 +267,11 @@ void spice_qxl_destroy_surface_wait(QXLInstance *instance, uint32_t surface_id)
|
||||
{
|
||||
RedWorkerMessageDestroySurfaceWait payload;
|
||||
|
||||
if (surface_id != 0) {
|
||||
spice_warning("Invalid surface_id != 0: %u", surface_id);
|
||||
return;
|
||||
}
|
||||
|
||||
payload.surface_id = surface_id;
|
||||
instance->st->send_message(payload);
|
||||
}
|
||||
|
||||
@ -364,8 +364,6 @@ handle_dev_del_memslot(RedWorker* worker, RedWorkerMessageDelMemslot* msg)
|
||||
static void
|
||||
handle_dev_destroy_surface_wait(RedWorker* worker, RedWorkerMessageDestroySurfaceWait* msg)
|
||||
{
|
||||
spice_return_if_fail(msg->surface_id == 0);
|
||||
|
||||
flush_all_qxl_commands(worker);
|
||||
display_channel_destroy_surface_wait(worker->display_channel, msg->surface_id);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user