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
228d8559
Commit
228d8559
authored
Aug 18, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Correctly free CF_DIB format, and don't free unknown GDI formats.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4fa616c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
26 deletions
+18
-26
clipboard.c
dlls/winex11.drv/clipboard.c
+18
-26
No files found.
dlls/winex11.drv/clipboard.c
View file @
228d8559
...
...
@@ -577,38 +577,30 @@ static void X11DRV_CLIPBOARD_FreeData(LPWINE_CLIPDATA lpData)
{
TRACE
(
"%04x
\n
"
,
lpData
->
wFormatID
);
if
((
lpData
->
wFormatID
>=
CF_GDIOBJFIRST
&&
lpData
->
wFormatID
<=
CF_GDIOBJLAST
)
||
lpData
->
wFormatID
==
CF_BITMAP
||
lpData
->
wFormatID
==
CF_DIB
||
lpData
->
wFormatID
==
CF_PALETTE
)
{
if
(
lpData
->
hData
)
DeleteObject
(
lpData
->
hData
);
if
(
!
lpData
->
hData
)
return
;
if
((
lpData
->
wFormatID
==
CF_DIB
)
&&
lpData
->
drvData
)
XFreePixmap
(
gdi_display
,
lpData
->
drvData
);
}
else
if
(
lpData
->
wFormatID
==
CF_METAFILEPICT
)
switch
(
lpData
->
wFormatID
)
{
if
(
lpData
->
hData
)
{
case
CF_BITMAP
:
case
CF_PALETTE
:
DeleteObject
(
lpData
->
hData
);
break
;
case
CF_DIB
:
if
(
lpData
->
drvData
)
XFreePixmap
(
gdi_display
,
lpData
->
drvData
);
GlobalFree
(
lpData
->
hData
);
break
;
case
CF_METAFILEPICT
:
DeleteMetaFile
(((
METAFILEPICT
*
)
GlobalLock
(
lpData
->
hData
))
->
hMF
);
GlobalFree
(
lpData
->
hData
);
}
}
else
if
(
lpData
->
wFormatID
==
CF_ENHMETAFILE
)
{
if
(
lpData
->
hData
)
DeleteEnhMetaFile
(
lpData
->
hData
);
}
else
if
(
lpData
->
wFormatID
<
CF_PRIVATEFIRST
||
lpData
->
wFormatID
>
CF_PRIVATELAST
)
{
if
(
lpData
->
hData
)
break
;
case
CF_ENHMETAFILE
:
DeleteEnhMetaFile
(
lpData
->
hData
);
break
;
default:
if
(
lpData
->
wFormatID
>=
CF_PRIVATEFIRST
&&
lpData
->
wFormatID
<=
CF_PRIVATELAST
)
break
;
GlobalFree
(
lpData
->
hData
);
break
;
}
lpData
->
hData
=
0
;
lpData
->
drvData
=
0
;
}
...
...
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