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
56c0bb8b
Commit
56c0bb8b
authored
Jul 10, 1999
by
Juergen Schmied
Committed by
Alexandre Julliard
Jul 10, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed crash due to invalid GDI_Obj.
parent
a904e16f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
palette.c
graphics/x11drv/palette.c
+4
-4
No files found.
graphics/x11drv/palette.c
View file @
56c0bb8b
...
@@ -660,6 +660,9 @@ int X11DRV_PALETTE_ToPhysical( DC *dc, COLORREF color )
...
@@ -660,6 +660,9 @@ int X11DRV_PALETTE_ToPhysical( DC *dc, COLORREF color )
unsigned
char
spec_type
=
color
>>
24
;
unsigned
char
spec_type
=
color
>>
24
;
PALETTEOBJ
*
palPtr
=
(
PALETTEOBJ
*
)
GDI_GetObjPtr
(
hPal
,
PALETTE_MAGIC
);
PALETTEOBJ
*
palPtr
=
(
PALETTEOBJ
*
)
GDI_GetObjPtr
(
hPal
,
PALETTE_MAGIC
);
/* palPtr can be NULL when DC is being destroyed */
if
(
!
palPtr
)
return
0
;
if
(
X11DRV_PALETTE_PaletteFlags
&
X11DRV_PALETTE_FIXED
)
if
(
X11DRV_PALETTE_PaletteFlags
&
X11DRV_PALETTE_FIXED
)
{
{
/* there is no colormap limitation; we are going to have to compute
/* there is no colormap limitation; we are going to have to compute
...
@@ -724,10 +727,7 @@ int X11DRV_PALETTE_ToPhysical( DC *dc, COLORREF color )
...
@@ -724,10 +727,7 @@ int X11DRV_PALETTE_ToPhysical( DC *dc, COLORREF color )
else
else
{
{
/* palPtr can be NULL when DC is being destroyed */
if
(
!
palPtr
->
mapping
)
if
(
!
palPtr
)
return
0
;
else
if
(
!
palPtr
->
mapping
)
WARN
(
"Palette %04x is not realized
\n
"
,
dc
->
w
.
hPalette
);
WARN
(
"Palette %04x is not realized
\n
"
,
dc
->
w
.
hPalette
);
switch
(
spec_type
)
/* we have to peruse DC and system palette */
switch
(
spec_type
)
/* we have to peruse DC and system palette */
...
...
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