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
ac6f2009
Commit
ac6f2009
authored
Oct 18, 2007
by
Allan Tong
Committed by
Alexandre Julliard
Oct 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix resource cleanup if CreateCubeTexture fails.
parent
25e15ddb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
device.c
dlls/wined3d/device.c
+8
-2
No files found.
dlls/wined3d/device.c
View file @
ac6f2009
...
...
@@ -1107,10 +1107,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
if
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
{
if
(
!
GL_SUPPORT
(
SGIS_GENERATE_MIPMAP
))
{
WARN
(
"No mipmap generation support, returning D3DERR_INVALIDCALL
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppCubeTexture
=
NULL
;
return
WINED3DERR_INVALIDCALL
;
}
if
(
Levels
>
1
)
{
WARN
(
"D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppCubeTexture
=
NULL
;
return
WINED3DERR_INVALIDCALL
;
}
Levels
=
1
;
...
...
@@ -1139,11 +1145,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
int
k
;
int
l
;
for
(
l
=
0
;
l
<
j
;
l
++
)
{
IWineD3DSurface_Release
(
object
->
surfaces
[
j
][
i
]);
IWineD3DSurface_Release
(
object
->
surfaces
[
l
][
i
]);
}
for
(
k
=
0
;
k
<
i
;
k
++
)
{
for
(
l
=
0
;
l
<
6
;
l
++
)
{
IWineD3DSurface_Release
(
object
->
surfaces
[
l
][
j
]);
IWineD3DSurface_Release
(
object
->
surfaces
[
l
][
k
]);
}
}
...
...
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