gameux: Always return NULL when category not available (valgrind)
André Hentschel
nerv at dawncrow.de
Wed Jan 26 10:16:17 CST 2011
http://austinenglish.com/logs/valgrind/2011-01-25-11.02/vg-gameux_gamestatistics.txt
native returns S_OK, but NULL for the title when the category is not available
see also http://source.winehq.org/git/wine.git/?a=blob;f=dlls/gameux/tests/gamestatistics.c;h=5bae4c8fb3cf3a013c908927ef895b07daafe548;hb=HEAD#l365
That should also fix the crash in http://test.winehq.org/data/72e089d6009b524c68e9996d7c6e042c3f86cd69/wine_ss-ku1010-win32-heap/gameux:gamestatistics.html
---
dlls/gameux/gamestatistics.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c
index c96fb6d..7ad5e52 100644
--- a/dlls/gameux/gamestatistics.c
+++ b/dlls/gameux/gamestatistics.c
@@ -826,7 +826,7 @@ static HRESULT WINAPI GameStatisticsImpl_GetCategoryTitle(
hr = E_INVALIDARG;
- if(SUCCEEDED(hr))
+ if(SUCCEEDED(hr) && This->stats.categories[categoryIndex].sName)
{
nLength = lstrlenW(This->stats.categories[categoryIndex].sName);
if(nLength != 0)
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list