[PATCH 1/5] wined3d: Handle GetData() on event queries that aren't started yet.
Henri Verbeet
hverbeet at codeweavers.com
Tue Aug 11 02:42:12 CDT 2009
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 */
--
1.6.0.6
More information about the wine-patches
mailing list