Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e51b20bf
Commit
e51b20bf
authored
Sep 18, 2009
by
Markus Stockhausen
Committed by
Alexandre Julliard
Sep 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Check for NULL pointer in GdiAlphaBlend.
parent
7471cfce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
bitblt.c
dlls/gdi32/bitblt.c
+6
-4
bitmap.c
dlls/gdi32/tests/bitmap.c
+4
-0
No files found.
dlls/gdi32/bitblt.c
View file @
e51b20bf
...
...
@@ -518,9 +518,11 @@ BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heig
DC
*
dcDst
,
*
dcSrc
;
dcSrc
=
get_dc_ptr
(
hdcSrc
);
if
(
!
dcSrc
)
return
FALSE
;
if
((
dcDst
=
get_dc_ptr
(
hdcDst
)))
{
if
(
dcSrc
)
update_dc
(
dcSrc
);
update_dc
(
dcSrc
);
update_dc
(
dcDst
);
TRACE
(
"%p %d,%d %dx%d -> %p %d,%d %dx%d op=%02x flags=%02x srcconstalpha=%02x alphafmt=%02x
\n
"
,
hdcSrc
,
xSrc
,
ySrc
,
widthSrc
,
heightSrc
,
...
...
@@ -529,11 +531,11 @@ BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heig
blendFunction
.
SourceConstantAlpha
,
blendFunction
.
AlphaFormat
);
if
(
dcDst
->
funcs
->
pAlphaBlend
)
ret
=
dcDst
->
funcs
->
pAlphaBlend
(
dcDst
->
physDev
,
xDst
,
yDst
,
widthDst
,
heightDst
,
dcSrc
?
dcSrc
->
physDev
:
NULL
,
xSrc
,
ySrc
,
widthSrc
,
heightSrc
,
blendFunction
);
dcSrc
->
physDev
,
xSrc
,
ySrc
,
widthSrc
,
heightSrc
,
blendFunction
);
release_dc_ptr
(
dcDst
);
}
if
(
dcSrc
)
release_dc_ptr
(
dcSrc
);
release_dc_ptr
(
dcSrc
);
return
ret
;
}
...
...
dlls/gdi32/tests/bitmap.c
View file @
e51b20bf
...
...
@@ -2393,6 +2393,10 @@ static void test_GdiAlphaBlend(void)
expect_eq
(
pGdiAlphaBlend
(
hdcDst
,
0
,
0
,
20
,
20
,
hdcSrc
,
-
1
,
0
,
30
,
30
,
blend
),
TRUE
,
BOOL
,
"%d"
);
expect_eq
(
pGdiAlphaBlend
(
hdcDst
,
0
,
0
,
20
,
20
,
hdcSrc
,
0
,
-
1
,
30
,
30
,
blend
),
TRUE
,
BOOL
,
"%d"
);
SetLastError
(
0xdeadbeef
);
expect_eq
(
pGdiAlphaBlend
(
hdcDst
,
0
,
0
,
20
,
20
,
NULL
,
0
,
0
,
20
,
20
,
blend
),
FALSE
,
BOOL
,
"%d"
);
expect_eq
(
GetLastError
(),
0xdeadbeef
,
int
,
"%d"
);
SelectObject
(
hdcDst
,
oldDst
);
SelectObject
(
hdcSrc
,
oldSrc
);
DeleteObject
(
bmpSrc
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment