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
7d03a413
Commit
7d03a413
authored
Aug 07, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Aug 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Don't prematurely release stream.
parent
de351ab9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
graphics.c
dlls/gdiplus/graphics.c
+11
-9
No files found.
dlls/gdiplus/graphics.c
View file @
7d03a413
...
...
@@ -803,6 +803,8 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete,
if
(
!
hwmf
||
!
metafile
||
!
placeable
)
return
InvalidParameter
;
*
metafile
=
NULL
;
read
=
GetMetaFileBitsEx
(
hwmf
,
0
,
NULL
);
if
(
!
read
)
return
GenericError
;
...
...
@@ -819,20 +821,20 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete,
if
(
CreateStreamOnHGlobal
(
copy
,
TRUE
,
&
stream
)
!=
S_OK
){
ERR
(
"could not make stream
\n
"
);
goto
end
;
GdipFree
(
copy
);
goto
err
;
}
*
metafile
=
GdipAlloc
(
sizeof
(
GpMetafile
));
if
(
!*
metafile
){
retval
=
OutOfMemory
;
goto
e
nd
;
goto
e
rr
;
}
if
(
OleLoadPicture
(
stream
,
0
,
FALSE
,
&
IID_IPicture
,
(
LPVOID
*
)
&
((
*
metafile
)
->
image
.
picture
))
!=
S_OK
){
GdipFree
(
*
metafile
);
goto
end
;
}
(
LPVOID
*
)
&
((
*
metafile
)
->
image
.
picture
))
!=
S_OK
)
goto
err
;
(
*
metafile
)
->
image
.
type
=
ImageTypeMetafile
;
(
*
metafile
)
->
bounds
.
X
=
((
REAL
)
placeable
->
BoundingBox
.
Left
)
/
((
REAL
)
placeable
->
Inch
);
...
...
@@ -846,11 +848,11 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete,
if
(
delete
)
DeleteMetaFile
(
hwmf
);
ret
val
=
Ok
;
ret
urn
Ok
;
end:
err:
GdipFree
(
*
metafile
);
IStream_Release
(
stream
);
GdipFree
(
copy
);
return
retval
;
}
...
...
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