From 5aaa06b20b2d6872a32cd16fca6bcb9bdcea54b9 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Tue, 15 Apr 2014 02:26:47 +0000 Subject: [PATCH] - Fix AbiWord Crash when sizing. svn path=/trunk/; revision=62751 --- reactos/win32ss/user/ntuser/callback.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/reactos/win32ss/user/ntuser/callback.c b/reactos/win32ss/user/ntuser/callback.c index 74fb27171f6..3ed610f8bb4 100644 --- a/reactos/win32ss/user/ntuser/callback.c +++ b/reactos/win32ss/user/ntuser/callback.c @@ -97,9 +97,18 @@ IntSetTebWndCallback (HWND * hWnd, PWND * pWnd, PVOID * pActCtx) *pWnd = ClientInfo->CallbackWnd.pWnd; *pActCtx = ClientInfo->CallbackWnd.pActCtx; - ClientInfo->CallbackWnd.hWnd = hWndS; - ClientInfo->CallbackWnd.pWnd = DesktopHeapAddressToUser(Window); - ClientInfo->CallbackWnd.pActCtx = Window->pActCtx; + if (Window) + { + ClientInfo->CallbackWnd.hWnd = hWndS; + ClientInfo->CallbackWnd.pWnd = DesktopHeapAddressToUser(Window); + ClientInfo->CallbackWnd.pActCtx = Window->pActCtx; + } + else //// What if Dispatching WM_SYS/TIMER with NULL window? Fix AbiWord Crash when sizing. + { + ClientInfo->CallbackWnd.hWnd = hWndS; + ClientInfo->CallbackWnd.pWnd = Window; + ClientInfo->CallbackWnd.pActCtx = 0; + } } static VOID