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
69e17d6a
Commit
69e17d6a
authored
Sep 03, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: GdipGetLineGammaCorrection should check result pointer. Test added.
parent
26ccb33f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
brush.c
dlls/gdiplus/brush.c
+1
-1
brush.c
dlls/gdiplus/tests/brush.c
+25
-0
No files found.
dlls/gdiplus/brush.c
View file @
69e17d6a
...
@@ -631,7 +631,7 @@ GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient *line,
...
@@ -631,7 +631,7 @@ GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient *line,
{
{
TRACE
(
"(%p, %p)
\n
"
,
line
,
usinggamma
);
TRACE
(
"(%p, %p)
\n
"
,
line
,
usinggamma
);
if
(
!
line
)
if
(
!
line
||
!
usinggamma
)
return
InvalidParameter
;
return
InvalidParameter
;
*
usinggamma
=
line
->
gamma
;
*
usinggamma
=
line
->
gamma
;
...
...
dlls/gdiplus/tests/brush.c
View file @
69e17d6a
...
@@ -145,6 +145,30 @@ static void test_getbounds(void)
...
@@ -145,6 +145,30 @@ static void test_getbounds(void)
GdipDeleteBrush
((
GpBrush
*
)
brush
);
GdipDeleteBrush
((
GpBrush
*
)
brush
);
}
}
static
void
test_getgamma
(
void
)
{
GpStatus
status
;
GpLineGradient
*
line
;
GpPointF
start
,
end
;
BOOL
gamma
;
start
.
X
=
start
.
Y
=
0
.
0
;
end
.
X
=
end
.
Y
=
100
.
0
;
status
=
GdipCreateLineBrush
(
&
start
,
&
end
,
(
ARGB
)
0xdeadbeef
,
0xdeadbeef
,
WrapModeTile
,
&
line
);
expect
(
Ok
,
status
);
/* NULL arguments */
status
=
GdipGetLineGammaCorrection
(
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetLineGammaCorrection
(
line
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetLineGammaCorrection
(
NULL
,
&
gamma
);
expect
(
InvalidParameter
,
status
);
GdipDeleteBrush
((
GpBrush
*
)
line
);
}
START_TEST
(
brush
)
START_TEST
(
brush
)
{
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
@@ -162,6 +186,7 @@ START_TEST(brush)
...
@@ -162,6 +186,7 @@ START_TEST(brush)
test_gradientblendcount
();
test_gradientblendcount
();
test_getblend
();
test_getblend
();
test_getbounds
();
test_getbounds
();
test_getgamma
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
}
}
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