[PATCH] gameux: revert NULL ptr check and deref (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sun Jun 26 09:54:14 CDT 2011
Hi,
CID 2013
Ciao, Marcus
---
dlls/gameux/gamestatistics.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c
index 65aa0f7..70d909e 100644
--- a/dlls/gameux/gamestatistics.c
+++ b/dlls/gameux/gamestatistics.c
@@ -819,12 +819,13 @@ static HRESULT WINAPI GameStatisticsImpl_GetCategoryTitle(
TRACE("%p, %d, %p\n", This, categoryIndex, pTitle);
+ if(!pTitle)
+ return E_INVALIDARG;
*pTitle = NULL;
- if(!pTitle || categoryIndex >= MAX_CATEGORIES)
+ if (categoryIndex >= MAX_CATEGORIES)
hr = E_INVALIDARG;
-
if(SUCCEEDED(hr))
{
nLength = lstrlenW(This->stats.categories[categoryIndex].sName);
--
1.7.3.4
More information about the wine-patches
mailing list