[PATCH v2 1/2] user32: Fix menu item rectangle calculation in GetMenuItemRect().
Zhiyi Zhang
zzhang at codeweavers.com
Mon Jul 16 10:07:24 CDT 2018
Thanks. I should have caught that. v3 sent.
On Mon 7 16 22:50, Alexandre Julliard wrote:
> Zhiyi Zhang <zzhang at codeweavers.com> writes:
>
>> @@ -5326,7 +5327,14 @@ BOOL WINAPI GetMenuItemRect(HWND hwnd, HMENU hMenu, UINT uItem, RECT *rect)
>> OffsetRect(rect, menu->items_rect.left, menu->items_rect.top);
>> release_menu_ptr(menu);
>>
>> - MapWindowPoints(hwnd, 0, (POINT *)rect, 2);
>> + /* Popup menu item draws in the client area */
>> + if (menu->wFlags & MF_POPUP) MapWindowPoints(hwnd, 0, (POINT *)rect, 2);
>
> You shouldn't access the menu pointer after it has been released.
>
More information about the wine-devel
mailing list