Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_surface.c:
free(utf8); } + +/********************************************************************** + * wayland_surface_set_icon + */ +void wayland_surface_set_icon(struct wayland_surface *surface, UINT type, ICONINFO *ii) +{ + HDC hDC; + struct wayland_shm_buffer *icon_buf; + + assert(ii); + assert(surface->xdg_toplevel && surface->role == WAYLAND_SURFACE_ROLE_TOPLEVEL);
Although this is not strictly incorrect (C supports union "type punning"), it seems cleaner if we only read from `surface->xdg_toplevel` after we have established that the member is actually being used by the current role, i.e., reorder the '&&' operands above. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6938#note_99649