From 92d954c54252a5e55f1d894c4dbe409d8ce1f130 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 26 May 2008 20:52:28 +0000 Subject: [PATCH] - check if MDICLIENTINFO is available before retrieving information - fixes a user32_winetest crash svn path=/trunk/; revision=33720 --- reactos/dll/win32/user32/windows/mdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/user32/windows/mdi.c b/reactos/dll/win32/user32/windows/mdi.c index 4d0e8f58e41..87e5adaa1c0 100644 --- a/reactos/dll/win32/user32/windows/mdi.c +++ b/reactos/dll/win32/user32/windows/mdi.c @@ -305,7 +305,7 @@ void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT del { MDICLIENTINFO *ci = get_client_info(hwndClient); total = ci ? ci->nTotalCreated : 0; - *id = ci->idFirstChild + ci->nActiveChildren; + *id = ci ? ci->idFirstChild + ci->nActiveChildren : 0; TRACE("MDI child id %04x\n", *id); }