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
4c68fdbf
Commit
4c68fdbf
authored
Dec 23, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Dec 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Simplify error handling in IDirectXFileEnumObjectImpl_GetNextDataObject.
parent
00c50a67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
d3dxof.c
dlls/d3dxof/d3dxof.c
+17
-9
No files found.
dlls/d3dxof/d3dxof.c
View file @
4c68fdbf
...
...
@@ -2219,8 +2219,8 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
IDirectXFileEnumObjectImpl
*
This
=
(
IDirectXFileEnumObjectImpl
*
)
iface
;
IDirectXFileDataImpl
*
object
;
HRESULT
hr
;
LPBYTE
pdata
;
LPBYTE
pstrings
;
LPBYTE
pdata
=
NULL
;
LPBYTE
pstrings
=
NULL
;
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
ppDataObj
);
...
...
@@ -2248,7 +2248,8 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
if
(
!
pdata
)
{
ERR
(
"Out of memory
\n
"
);
return
DXFILEERR_BADALLOC
;
hr
=
DXFILEERR_BADALLOC
;
goto
error
;
}
This
->
buf
.
cur_pdata
=
This
->
buf
.
pdata
=
pdata
;
...
...
@@ -2256,24 +2257,24 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
if
(
!
pstrings
)
{
ERR
(
"Out of memory
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
buf
.
pxo
->
pdata
)
;
return
DXFILEERR_BADALLOC
;
hr
=
DXFILEERR_BADALLOC
;
goto
error
;
}
This
->
buf
.
cur_pstrings
=
This
->
buf
.
pstrings
=
pstrings
;
if
(
!
parse_object
(
&
This
->
buf
))
{
TRACE
(
"Object is not correct
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
buf
.
pxo
->
pdata
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
buf
.
pstrings
);
return
DXFILEERR_PARSEERROR
;
hr
=
DXFILEERR_PARSEERROR
;
goto
error
;
}
This
->
buf
.
pxo
->
nb_subobjects
=
This
->
buf
.
cur_subobject
;
if
(
This
->
buf
.
cur_subobject
>
MAX_SUBOBJECTS
)
{
FIXME
(
"Too many suobjects %d
\n
"
,
This
->
buf
.
cur_subobject
);
return
DXFILEERR_BADALLOC
;
hr
=
DXFILEERR_BADALLOC
;
goto
error
;
}
object
->
pstrings
=
pstrings
;
...
...
@@ -2287,6 +2288,13 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
This
->
nb_xobjects
++
;
return
DXFILE_OK
;
error:
HeapFree
(
GetProcessHeap
(),
0
,
pdata
);
HeapFree
(
GetProcessHeap
(),
0
,
pstrings
);
return
hr
;
}
static
HRESULT
WINAPI
IDirectXFileEnumObjectImpl_GetDataObjectById
(
IDirectXFileEnumObject
*
iface
,
REFGUID
rguid
,
LPDIRECTXFILEDATA
*
ppDataObj
)
...
...
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