Looks fine, but we could retain the warning with additional explanation. For example (proposed): diff --git a/server/red-worker.c b/server/red-worker.c index 62e5d86..46f562f 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -662,8 +662,10 @@ static void destroy_primary_surface(RedWorker *worker, uint32_t surface_id) { DisplayChannel *display = worker->display_channel; - if (!display_channel_validate_surface(display, surface_id)) + if (!display_channel_validate_surface(display, surface_id)) { + spice_warning("double destroy of primary surface"); return; + } spice_warn_if_fail(surface_id == 0); spice_debug(NULL); Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> On Mon, 2016-09-19 at 09:30 +0100, Frediano Ziglio wrote: > validate_surface already do the same checks. > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > server/red-worker.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/server/red-worker.c b/server/red-worker.c > index 590412b..e39bd84 100644 > --- a/server/red-worker.c > +++ b/server/red-worker.c > @@ -693,12 +693,6 @@ static void destroy_primary_surface(RedWorker > *worker, uint32_t surface_id) > return; > spice_warn_if_fail(surface_id == 0); > > - spice_debug(NULL); > - if (!display->surfaces[surface_id].context.canvas) { > - spice_warning("double destroy of primary surface"); > - return; > - } > - > flush_all_qxl_commands(worker); > display_channel_destroy_surface_wait(display, 0); > display_channel_surface_unref(display, 0); _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel