https://bugs.winehq.org/show_bug.cgi?id=38275
Bug ID: 38275 Summary: DeferWindowPos accept NULL HWND and fail at EndDeferWindowPos() Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: rozhuk.im@gmail.com Distribution: ---
http://source.winehq.org/git/wine.git/blob/e882cdf55cc004b5ffb7b85d912b4733d...
DeferWindowPos( HDWP hdwp, HWND hwnd...
does not check: hwnd != NULL (windows does!) and later EndDeferWindowPos() fail in
http://source.winehq.org/git/wine.git/blob/e882cdf55cc004b5ffb7b85d912b4733d... X11DRV_SetWindowPos(...) ... 763 /* Fix redundant flags */ 764 if (!fixup_flags( winpos )) return FALSE;
fixup_flags() ... WND *wndPtr = WIN_GetPtr( winpos->hwnd ); 382 BOOL ret = TRUE; 383 384 if (!wndPtr || wndPtr == WND_OTHER_PROCESS) 385 { 386 SetLastError( ERROR_INVALID_WINDOW_HANDLE ); 387 return FALSE; 388 }
Miranda NG was affected.
Workaround: if (NULL != hwnd) /* Wine fix. */ hdwp = DeferWindowPos(hdwp, hwnd...);