Module: wine Branch: master Commit: 4f705f6f62185de6fa78b88b0aaec554a0fbf0de URL: https://source.winehq.org/git/wine.git/?a=commit;h=4f705f6f62185de6fa78b88b0... Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com> Date: Mon Apr 11 12:53:50 2022 +0300 win32u: Avoid iterating over a NULL window list when broadcasting. Signed-off-by: Alexandros Frantzis <alexandros.frantzis(a)collabora.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/win32u/message.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 46c42188d70..9479595ae53 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -2508,9 +2508,11 @@ static BOOL is_message_broadcastable( UINT msg ) */ static BOOL broadcast_message( struct send_message_info *info, DWORD_PTR *res_ptr ) { - if (is_message_broadcastable( info->msg )) + HWND *list; + + if (is_message_broadcastable( info->msg ) && + (list = list_window_children( 0, get_desktop_window(), NULL, 0 ))) { - HWND *list = list_window_children( 0, get_desktop_window(), NULL, 0 ); int i; for (i = 0; list[i]; i++)