Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d3baf035
Commit
d3baf035
authored
Mar 19, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Resource size should always be non-zero in resource_init().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
afe4f54b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
resource.c
dlls/wined3d/resource.c
+6
-10
No files found.
dlls/wined3d/resource.c
View file @
d3baf035
...
...
@@ -91,6 +91,9 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
return
WINED3DERR_INVALIDCALL
;
}
if
(
!
size
)
ERR
(
"Attempting to create a zero-sized resource.
\n
"
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
resource_types
);
++
i
)
{
if
(
resource_types
[
i
].
type
!=
type
...
...
@@ -188,17 +191,10 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
resource
->
resource_ops
=
resource_ops
;
resource
->
map_binding
=
WINED3D_LOCATION_SYSMEM
;
if
(
size
)
{
if
(
!
wined3d_resource_allocate_sysmem
(
resource
))
{
ERR
(
"Failed to allocate system memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
}
else
if
(
!
wined3d_resource_allocate_sysmem
(
resource
))
{
resource
->
heap_memory
=
NULL
;
ERR
(
"Failed to allocate system memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
if
(
!
(
usage
&
WINED3DUSAGE_PRIVATE
))
...
...
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