mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
Fix some NULL dereferencing.
This commit is contained in:
parent
2e5b1b66b0
commit
91befd6902
1 changed files with 8 additions and 7 deletions
|
@ -1074,20 +1074,21 @@ ImageList_DrawEx (HIMAGELIST himl, INT i, HDC hdc, INT x, INT y,
|
|||
BOOL WINAPI
|
||||
ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
||||
{
|
||||
INT cx, cy, nOvlIdx;
|
||||
INT cx, cy, lx, ly, nOvlIdx;
|
||||
DWORD fState, dwRop;
|
||||
UINT fStyle;
|
||||
COLORREF clrBk, oldImageBk, oldImageFg;
|
||||
HDC hImageDC, hImageListDC, hMaskListDC;
|
||||
HBITMAP hImageBmp, hOldImageBmp, hOldImageListBmp, hOldMaskListBmp, hBlendMaskBmp;
|
||||
BOOL bIsTransparent, bBlend, bResult = FALSE;
|
||||
const HIMAGELIST himl = pimldp->himl;
|
||||
const INT lx = himl->cx * pimldp->i + pimldp->xBitmap;
|
||||
const INT ly = pimldp->yBitmap;
|
||||
|
||||
if (!pimldp || !himl) return FALSE;
|
||||
HIMAGELIST himl;
|
||||
|
||||
if (!pimldp || !(himl = pimldp->himl)) return FALSE;
|
||||
if ((pimldp->i < 0) || (pimldp->i >= himl->cCurImage)) return FALSE;
|
||||
|
||||
|
||||
lx = himl->cx * pimldp->i + pimldp->xBitmap;
|
||||
ly = pimldp->yBitmap;
|
||||
|
||||
fState = pimldp->cbSize < sizeof(IMAGELISTDRAWPARAMS) ? ILS_NORMAL : pimldp->fState;
|
||||
fStyle = pimldp->fStyle & ~ILD_OVERLAYMASK;
|
||||
cx = (pimldp->cx == 0) ? himl->cx : pimldp->cx;
|
||||
|
|
Loading…
Reference in a new issue