mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 04:36:40 +00:00
Check for null pointers, keep wine msg test from crashing.
svn path=/trunk/; revision=34774
This commit is contained in:
parent
0104c42bb4
commit
9f5f04ab20
1 changed files with 20 additions and 0 deletions
|
@ -1441,6 +1441,11 @@ GetMessageA(LPMSG lpMsg,
|
||||||
MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg);
|
MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg);
|
||||||
return (BOOL) -1;
|
return (BOOL) -1;
|
||||||
}
|
}
|
||||||
|
if (!lpMsg)
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_NOACCESS );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
*lpMsg = Conversion.AnsiMsg;
|
*lpMsg = Conversion.AnsiMsg;
|
||||||
Conversion.Ansi = TRUE;
|
Conversion.Ansi = TRUE;
|
||||||
Conversion.FinalMsg = lpMsg;
|
Conversion.FinalMsg = lpMsg;
|
||||||
|
@ -1481,6 +1486,11 @@ GetMessageW(LPMSG lpMsg,
|
||||||
{
|
{
|
||||||
return (BOOL) -1;
|
return (BOOL) -1;
|
||||||
}
|
}
|
||||||
|
if (!lpMsg)
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_NOACCESS );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
*lpMsg = Conversion.UnicodeMsg;
|
*lpMsg = Conversion.UnicodeMsg;
|
||||||
Conversion.Ansi = FALSE;
|
Conversion.Ansi = FALSE;
|
||||||
Conversion.FinalMsg = lpMsg;
|
Conversion.FinalMsg = lpMsg;
|
||||||
|
@ -1527,6 +1537,11 @@ PeekMessageA(LPMSG lpMsg,
|
||||||
MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg);
|
MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg);
|
||||||
return (BOOL) -1;
|
return (BOOL) -1;
|
||||||
}
|
}
|
||||||
|
if (!lpMsg)
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_NOACCESS );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
*lpMsg = Conversion.AnsiMsg;
|
*lpMsg = Conversion.AnsiMsg;
|
||||||
Conversion.Ansi = TRUE;
|
Conversion.Ansi = TRUE;
|
||||||
Conversion.FinalMsg = lpMsg;
|
Conversion.FinalMsg = lpMsg;
|
||||||
|
@ -1570,6 +1585,11 @@ PeekMessageW(
|
||||||
{
|
{
|
||||||
return (BOOL) -1;
|
return (BOOL) -1;
|
||||||
}
|
}
|
||||||
|
if (!lpMsg)
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_NOACCESS );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
*lpMsg = Conversion.UnicodeMsg;
|
*lpMsg = Conversion.UnicodeMsg;
|
||||||
Conversion.Ansi = FALSE;
|
Conversion.Ansi = FALSE;
|
||||||
Conversion.FinalMsg = lpMsg;
|
Conversion.FinalMsg = lpMsg;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue