When looking into sys menu, check if items are present before
dereferencing.
This commit is contained in:
parent
153334e50a
commit
dfed208e90
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue