dcc: Remove a redundant NULL pointer check in dcc_create_surface()

dcc_create_surface() already returns immediately if dcc is NULL.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Francois Gouget 2019-03-21 11:19:13 +01:00 committed by Frediano Ziglio
parent 4f8db6fac3
commit 7988d2fe12

View File

@ -303,8 +303,7 @@ void dcc_create_surface(DisplayChannelClient *dcc, int surface_id)
flags = is_primary_surface(display, surface_id) ? SPICE_SURFACE_FLAGS_PRIMARY : 0;
/* don't send redundant create surface commands to client */
if (!dcc ||
common_graphics_channel_get_during_target_migrate(COMMON_GRAPHICS_CHANNEL(display)) ||
if (common_graphics_channel_get_during_target_migrate(COMMON_GRAPHICS_CHANNEL(display)) ||
dcc->priv->surface_client_created[surface_id]) {
return;
}