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
da032791
Commit
da032791
authored
Sep 07, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Make sure the bitmap created from a packed DIB is owned by x11drv…
winex11: Make sure the bitmap created from a packed DIB is owned by x11drv before getting its pixmap.
parent
d7ed2457
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
dib.c
dlls/winex11.drv/dib.c
+10
-2
No files found.
dlls/winex11.drv/dib.c
View file @
da032791
...
...
@@ -4323,10 +4323,11 @@ HGLOBAL X11DRV_DIB_CreateDIBFromPixmap(Pixmap pixmap, HDC hdc)
*/
Pixmap
X11DRV_DIB_CreatePixmapFromDIB
(
HGLOBAL
hPackedDIB
,
HDC
hdc
)
{
Pixmap
pixmap
;
Pixmap
pixmap
=
0
;
X_PHYSBITMAP
*
physBitmap
;
HBITMAP
hBmp
;
LPBITMAPINFO
pbmi
;
HDC
memdc
;
/* Create a DDB from the DIB */
...
...
@@ -4336,10 +4337,17 @@ Pixmap X11DRV_DIB_CreatePixmapFromDIB( HGLOBAL hPackedDIB, HDC hdc )
pbmi
,
DIB_RGB_COLORS
);
GlobalUnlock
(
hPackedDIB
);
/* make sure it's owned by x11drv */
memdc
=
CreateCompatibleDC
(
hdc
);
SelectObject
(
memdc
,
hBmp
);
DeleteDC
(
memdc
);
/* clear the physBitmap so that we can steal its pixmap */
physBitmap
=
X11DRV_get_phys_bitmap
(
hBmp
);
if
((
physBitmap
=
X11DRV_get_phys_bitmap
(
hBmp
)))
{
pixmap
=
physBitmap
->
pixmap
;
physBitmap
->
pixmap
=
0
;
}
/* Delete the DDB we created earlier now that we have stolen its pixmap */
DeleteObject
(
hBmp
);
...
...
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