[PATCH 2/5] wined3d: Ignore set_priority calls on non-managed resources.
Stefan Dösinger
stefan at codeweavers.com
Tue Jul 8 08:58:43 CDT 2014
---
dlls/wined3d/resource.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 3a54dd8..caec580 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -163,7 +163,15 @@ void resource_unload(struct wined3d_resource *resource)
DWORD resource_set_priority(struct wined3d_resource *resource, DWORD priority)
{
- DWORD prev = resource->priority;
+ DWORD prev;
+
+ if (resource->pool != WINED3D_POOL_MANAGED)
+ {
+ WARN("Called on non-managed resource %p, ignoring.\n", resource);
+ return 0;
+ }
+
+ prev = resource->priority;
resource->priority = priority;
TRACE("resource %p, new priority %u, returning old priority %u.\n", resource, priority, prev);
return prev;
--
1.8.5.5
More information about the wine-patches
mailing list