From 2f434abd37d73c2ebafcbccbe1726816068ea205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Tue, 9 Dec 2003 23:36:25 +0000 Subject: [PATCH] Fix some Wine/ReactOS differences svn path=/trunk/; revision=6941 --- reactos/lib/user32/windows/mdi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/reactos/lib/user32/windows/mdi.c b/reactos/lib/user32/windows/mdi.c index a0506d5f691..ceae74ea75b 100644 --- a/reactos/lib/user32/windows/mdi.c +++ b/reactos/lib/user32/windows/mdi.c @@ -1332,7 +1332,11 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, { MDICLIENTINFO *ci; - if (!(ci = get_client_info( hwnd ))) return 0; + if (WM_NCCREATE != message && WM_CREATE != message + && NULL == (ci = get_client_info(hwnd))) + { + return 0; + } switch (message) { @@ -1345,6 +1349,12 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, #ifndef __REACTOS__ WND *wndPtr = WIN_GetPtr( hwnd ); #endif + ci = HeapAlloc(GetProcessHeap(), 0, sizeof(MDICLIENTINFO)); + if (NULL == ci) + { + return -1; + } + SetWindowLongPtr(hwnd, 0, (LONG_PTR) ci); /* Translation layer doesn't know what's in the cs->lpCreateParams * so we have to keep track of what environment we're in. */