mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:45:50 +00:00
Fixing two user mode crash for menu.
Do not try reading from NULL pointer and compare the value. This let me come bit futer with user32_winetest.exe, but we still have some user mode crash with menu. svn path=/trunk/; revision=23003
This commit is contained in:
parent
fa1e866a00
commit
06f4494f85
1 changed files with 17 additions and 10 deletions
|
@ -4488,10 +4488,13 @@ ModifyMenuA(
|
|||
HeapFree(GetProcessHeap(),0, mii.dwTypeData);
|
||||
}
|
||||
/* Item beginning with a backspace is a help item */
|
||||
if (*lpNewItem == '\b')
|
||||
{
|
||||
mii.fType |= MF_HELP;
|
||||
lpNewItem++;
|
||||
if (lpNewItem != NULL)
|
||||
{
|
||||
if (*lpNewItem == '\b')
|
||||
{
|
||||
mii.fType |= MF_HELP;
|
||||
lpNewItem++;
|
||||
}
|
||||
}
|
||||
mii.fMask |= MIIM_TYPE;
|
||||
mii.dwTypeData = (LPSTR)lpNewItem;
|
||||
|
@ -4579,14 +4582,18 @@ ModifyMenuW(
|
|||
}
|
||||
else
|
||||
{
|
||||
/*if(mii.dwTypeData != NULL)
|
||||
/*
|
||||
if(mii.dwTypeData != NULL)
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0, mii.dwTypeData);
|
||||
}*/
|
||||
if (*lpNewItem == '\b')
|
||||
{
|
||||
mii.fType |= MF_HELP;
|
||||
lpNewItem++;
|
||||
} */
|
||||
if (lpNewItem != NULL)
|
||||
{
|
||||
if (*lpNewItem == '\b')
|
||||
{
|
||||
mii.fType |= MF_HELP;
|
||||
lpNewItem++;
|
||||
}
|
||||
}
|
||||
mii.fMask |= MIIM_TYPE;
|
||||
mii.dwTypeData = (LPWSTR)lpNewItem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue