[PATCH] win32u: Avoid iterating over a NULL window list when broadcasting.
Alexandros Frantzis
alexandros.frantzis at collabora.com
Mon Apr 11 04:53:50 CDT 2022
Signed-off-by: Alexandros Frantzis <alexandros.frantzis at collabora.com>
---
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++)
--
2.35.1
More information about the wine-devel
mailing list