mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
Check DC for NULL before accessing it, fixes Coverity CID 661.
svn path=/trunk/; revision=36609
This commit is contained in:
parent
dc3e3e8ef0
commit
ac197ef4f3
1 changed files with 2 additions and 2 deletions
|
@ -3356,13 +3356,13 @@ NtGdiGetCharSet(HDC hDC)
|
|||
DWORD cscp = IntGdiGetCharSet(hDC);
|
||||
// If here, update everything!
|
||||
Dc = DC_LockDc(hDC);
|
||||
Dc_Attr = Dc->pDc_Attr;
|
||||
if (!Dc_Attr) Dc_Attr = &Dc->Dc_Attr;
|
||||
if (!Dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
Dc_Attr = Dc->pDc_Attr;
|
||||
if (!Dc_Attr) Dc_Attr = &Dc->Dc_Attr;
|
||||
Dc_Attr->iCS_CP = cscp;
|
||||
Dc_Attr->ulDirty_ &= ~DIRTY_CHARSET;
|
||||
DC_UnlockDc( Dc );
|
||||
|
|
Loading…
Reference in a new issue