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
70e4611e
Commit
70e4611e
authored
Jul 01, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Properly release cache DCs instead of trying to delete them.
parent
c3b80267
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
olepicture.c
dlls/oleaut32/olepicture.c
+3
-5
No files found.
dlls/oleaut32/olepicture.c
View file @
70e4611e
...
...
@@ -1232,7 +1232,6 @@ static HRESULT OLEPictureImpl_LoadGif(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
if
(
pixel
==
(
transparent
&
0x000000FFU
))
monoPointer
[
j
>>
3
]
|=
1
<<
(
7
-
(
j
&
7
));
}
}
hdcref
=
GetDC
(
0
);
hTempMask
=
CreateDIBitmap
(
hdcref
,
&
bmi
->
bmiHeader
,
...
...
@@ -1241,7 +1240,6 @@ static HRESULT OLEPictureImpl_LoadGif(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
bmi
,
DIB_RGB_COLORS
);
DeleteDC
(
hdcref
);
bmi
->
bmiHeader
.
biHeight
=
-
bmi
->
bmiHeader
.
biHeight
;
This
->
hbmMask
=
CreateBitmap
(
bmi
->
bmiHeader
.
biWidth
,
bmi
->
bmiHeader
.
biHeight
,
1
,
1
,
NULL
);
...
...
@@ -1266,7 +1264,7 @@ static HRESULT OLEPictureImpl_LoadGif(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
DeleteObject
(
hTempMask
);
}
DeleteDC
(
hdcref
);
ReleaseDC
(
0
,
hdcref
);
This
->
desc
.
picType
=
PICTYPE_BITMAP
;
OLEPictureImpl_SetBitmap
(
This
);
DGifCloseFile
(
gif
);
...
...
@@ -1369,7 +1367,7 @@ static HRESULT OLEPictureImpl_LoadJpeg(OLEPictureImpl *This, BYTE *xbuf, ULONG x
(
BITMAPINFO
*
)
&
bmi
,
DIB_RGB_COLORS
);
DeleteDC
(
hdcref
);
ReleaseDC
(
0
,
hdcref
);
This
->
desc
.
picType
=
PICTYPE_BITMAP
;
OLEPictureImpl_SetBitmap
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
bits
);
...
...
@@ -1398,7 +1396,7 @@ static HRESULT OLEPictureImpl_LoadDIB(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
bi
,
DIB_RGB_COLORS
);
DeleteDC
(
hdcref
);
ReleaseDC
(
0
,
hdcref
);
if
(
This
->
desc
.
u
.
bmp
.
hbitmap
==
0
)
return
E_FAIL
;
This
->
desc
.
picType
=
PICTYPE_BITMAP
;
...
...
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