Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4f44845d
Commit
4f44845d
authored
Apr 09, 2001
by
Francois Gouget
Committed by
Alexandre Julliard
Apr 09, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetDeviceCaps: make sure the devCaps field is not NULL before
dereferencing it.
parent
40af1a87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
dc.c
objects/dc.c
+5
-2
No files found.
objects/dc.c
View file @
4f44845d
...
@@ -841,9 +841,12 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
...
@@ -841,9 +841,12 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
hdc
,
cap
);
hdc
,
cap
);
if
((
dc
=
DC_GetDCPtr
(
hdc
)))
if
((
dc
=
DC_GetDCPtr
(
hdc
)))
{
{
ret
=
*
(
WORD
*
)(((
char
*
)
dc
->
devCaps
)
+
cap
);
if
(
dc
->
devCaps
)
{
ret
=
*
(
WORD
*
)(((
char
*
)
dc
->
devCaps
)
+
cap
);
if
((
cap
==
NUMCOLORS
)
&&
(
ret
==
0xffff
))
ret
=
-
1
;
}
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
if
((
cap
==
NUMCOLORS
)
&&
(
ret
==
0xffff
))
ret
=
-
1
;
}
}
break
;
break
;
}
}
...
...
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