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
698fddf9
Commit
698fddf9
authored
Jun 21, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Jun 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Properly clean up the new metafile data.
parent
42db8e2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
image.c
dlls/gdiplus/image.c
+15
-1
metafile.c
dlls/gdiplus/metafile.c
+4
-0
No files found.
dlls/gdiplus/image.c
View file @
698fddf9
...
...
@@ -2027,7 +2027,21 @@ GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
DeleteDC
(((
GpBitmap
*
)
image
)
->
hdc
);
DeleteObject
(((
GpBitmap
*
)
image
)
->
hbitmap
);
}
else
if
(
image
->
type
!=
ImageTypeMetafile
)
else
if
(
image
->
type
==
ImageTypeMetafile
)
{
GpMetafile
*
metafile
=
(
GpMetafile
*
)
image
;
GdipFree
(
metafile
->
comment_data
);
DeleteEnhMetaFile
(
CloseEnhMetaFile
(
metafile
->
record_dc
));
DeleteEnhMetaFile
(
metafile
->
hemf
);
if
(
metafile
->
record_graphics
)
{
WARN
(
"metafile closed while recording
\n
"
);
/* not sure what to do here; for now just prevent the graphics from functioning or using this object */
metafile
->
record_graphics
->
image
=
NULL
;
metafile
->
record_graphics
->
busy
=
TRUE
;
}
}
else
{
WARN
(
"invalid image: %p
\n
"
,
image
);
return
ObjectBusy
;
...
...
dlls/gdiplus/metafile.c
View file @
698fddf9
...
...
@@ -307,6 +307,10 @@ GpStatus METAFILE_GraphicsDeleted(GpMetafile* metafile)
metafile
->
hemf
=
CloseEnhMetaFile
(
metafile
->
record_dc
);
metafile
->
record_dc
=
NULL
;
GdipFree
(
metafile
->
comment_data
);
metafile
->
comment_data
=
NULL
;
metafile
->
comment_data_size
=
0
;
return
stat
;
}
...
...
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