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
9ff40749
Commit
9ff40749
authored
Mar 15, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Do not destroy surfaces that are still attached.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
91f0b001
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
surface.c
dlls/ddraw/surface.c
+11
-14
No files found.
dlls/ddraw/surface.c
View file @
9ff40749
...
...
@@ -531,7 +531,14 @@ static void ddraw_surface_cleanup(struct ddraw_surface *surface)
ULONG
ddraw_surface_release_iface
(
struct
ddraw_surface
*
This
)
{
ULONG
iface_count
=
InterlockedDecrement
(
&
This
->
iface_count
);
ULONG
iface_count
;
/* Prevent the surface from being destroyed if it's still attached to
* another surface. It will be destroyed when the root is destroyed. */
if
(
This
->
iface_count
==
1
&&
This
->
attached_iface
)
IUnknown_AddRef
(
This
->
attached_iface
);
iface_count
=
InterlockedDecrement
(
&
This
->
iface_count
);
TRACE
(
"%p decreasing iface count to %u.
\n
"
,
This
,
iface_count
);
if
(
iface_count
==
0
)
...
...
@@ -5623,20 +5630,10 @@ static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed(void *paren
TRACE
(
"surface %p.
\n
"
,
surface
);
/* Check for attached surfaces and detach them. */
/* This shouldn't happen, ddraw_surface_release_iface() should prevent the
* surface from being destroyed in this case. */
if
(
surface
->
first_attached
!=
surface
)
{
/* Well, this shouldn't happen: The surface being attached is
* referenced in AddAttachedSurface(), so it shouldn't be released
* until DeleteAttachedSurface() is called, because the refcount is
* held. It looks like the application released it often enough to
* force this. */
WARN
(
"Surface is still attached to surface %p.
\n
"
,
surface
->
first_attached
);
/* The refcount will drop to -1 here */
if
(
FAILED
(
ddraw_surface_delete_attached_surface
(
surface
->
first_attached
,
surface
,
surface
->
attached_iface
)))
ERR
(
"DeleteAttachedSurface failed.
\n
"
);
}
ERR
(
"Surface is still attached to surface %p.
\n
"
,
surface
->
first_attached
);
while
(
surface
->
next_attached
)
if
(
FAILED
(
ddraw_surface_delete_attached_surface
(
surface
,
...
...
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