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
bf235a66
Commit
bf235a66
authored
Oct 28, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Initialize the actual array in d3drm_frame_array_create() as well.
parent
71ecb556
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
frame.c
dlls/d3drm/frame.c
+18
-18
No files found.
dlls/d3drm/frame.c
View file @
bf235a66
...
...
@@ -197,15 +197,31 @@ static const struct IDirect3DRMFrameArrayVtbl d3drm_frame_array_vtbl =
d3drm_frame_array_GetElement
,
};
static
struct
d3drm_frame_array
*
d3drm_frame_array_create
(
void
)
static
struct
d3drm_frame_array
*
d3drm_frame_array_create
(
unsigned
int
frame_count
,
IDirect3DRMFrame3
**
frames
)
{
struct
d3drm_frame_array
*
array
;
unsigned
int
i
;
if
(
!
(
array
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
array
))))
return
NULL
;
array
->
IDirect3DRMFrameArray_iface
.
lpVtbl
=
&
d3drm_frame_array_vtbl
;
array
->
ref
=
1
;
array
->
size
=
frame_count
;
if
(
frame_count
)
{
if
(
!
(
array
->
frames
=
HeapAlloc
(
GetProcessHeap
(),
0
,
frame_count
*
sizeof
(
*
array
->
frames
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
array
);
return
NULL
;
}
for
(
i
=
0
;
i
<
frame_count
;
++
i
)
{
IDirect3DRMFrame3_QueryInterface
(
frames
[
i
],
&
IID_IDirect3DRMFrame
,
(
void
**
)
&
array
->
frames
[
i
]);
}
}
return
array
;
}
...
...
@@ -1500,25 +1516,9 @@ static HRESULT WINAPI d3drm_frame3_GetChildren(IDirect3DRMFrame3 *iface, IDirect
if
(
!
children
)
return
D3DRMERR_BADVALUE
;
if
(
!
(
array
=
d3drm_frame_array_create
()))
if
(
!
(
array
=
d3drm_frame_array_create
(
frame
->
nb_children
,
frame
->
children
)))
return
E_OUTOFMEMORY
;
array
->
size
=
frame
->
nb_children
;
if
(
frame
->
nb_children
)
{
ULONG
i
;
if
(
!
(
array
->
frames
=
HeapAlloc
(
GetProcessHeap
(),
0
,
frame
->
nb_children
*
sizeof
(
*
array
->
frames
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
array
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
frame
->
nb_children
;
++
i
)
{
IDirect3DRMFrame3_QueryInterface
(
frame
->
children
[
i
],
&
IID_IDirect3DRMFrame
,
(
void
**
)
&
array
->
frames
[
i
]);
}
}
*
children
=
&
array
->
IDirect3DRMFrameArray_iface
;
return
D3DRM_OK
;
...
...
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