Henri Verbeet : wined3d: Handle GetData() on event queries that aren' t started yet.

Alexandre Julliard julliard at winehq.org
Tue Aug 11 10:47:22 CDT 2009


Module: wine
Branch: master
Commit: 76fdf2c1a5909d11a351796a8a5819cfbf90e7e3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=76fdf2c1a5909d11a351796a8a5819cfbf90e7e3

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Aug 11 09:42:12 2009 +0200

wined3d: Handle GetData() on event queries that aren't started yet.

This fixes a regression introduced by fb77678e9f1bc5e1baa20f241d2fc00a718496e3.

---

 dlls/wined3d/query.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 6627b09..2a2c1b1 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -347,6 +347,14 @@ static HRESULT  WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void
 
     if (!pData || !dwSize) return S_OK;
 
+    if (!query->context)
+    {
+        ERR("Query not started, returning TRUE.\n");
+        *data = TRUE;
+
+        return S_OK;
+    }
+
     if (query->context->tid != GetCurrentThreadId())
     {
         /* See comment in IWineD3DQuery::Issue, event query codeblock */




More information about the wine-cvs mailing list