Commit dfed208e authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

When looking into sys menu, check if items are present before

dereferencing.
parent 153334e5
......@@ -3766,7 +3766,7 @@ HMENU WINAPI GetSystemMenu( HWND hWnd, BOOL bRevert )
{
POPUPMENU *menu = (POPUPMENU*)
USER_HEAP_LIN_ADDR(wndPtr->hSysMenu);
if( menu->items[0].hSubMenu == MENU_DefSysPopup )
if( menu->nItems > 0 && menu->items[0].hSubMenu == MENU_DefSysPopup )
menu->items[0].hSubMenu = MENU_CopySysPopup();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment