=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Ignore set_priority calls on non-managed resources.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jul 9 14:35:20 CDT 2014
Module: wine
Branch: master
Commit: 4cecbaa54d71742c6705af4be7ea6b07485489b6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4cecbaa54d71742c6705af4be7ea6b07485489b6
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Jul 8 15:58:43 2014 +0200
wined3d: Ignore set_priority calls on non-managed resources.
---
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;
More information about the wine-cvs
mailing list