[PATCH 1/8] wined3d: Do not update surface when empty box is passed.

Józef Kucia jkucia at codeweavers.com
Tue Jan 19 15:28:05 CST 2016


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/wined3d/device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7c5a4c2..d308083 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4070,7 +4070,8 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
     if (box)
     {
         if (box->left >= box->right || box->right > sub_resource->width
-                || box->top >= box->bottom || box->bottom > sub_resource->height)
+                || box->top >= box->bottom || box->bottom > sub_resource->height
+                || box->front >= box->back)
         {
             WARN("Invalid box (%u, %u, %u)->(%u, %u, %u) specified.\n",
                     box->left, box->top, box->front, box->right, box->bottom, box->back);
-- 
2.4.10




More information about the wine-patches mailing list