[PATCH] possible NULL ptr in TRACE
Marcus Meissner
marcus at jet.franken.de
Sun Jan 20 13:59:16 CST 2008
Hi,
Coverity noticed that plf might be NULL here
(CID: 667, and CID: 666).
So we should not dereference it in TRACE().
Ciao, Marcus
---
dlls/gdi32/font.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 2789df5..5cec471 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -848,8 +848,9 @@ static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf,
if (!dc) return 0;
- TRACE("lfFaceName = %s lfCharset = %d\n", debugstr_w(plf->lfFaceName),
- plf->lfCharSet);
+ if (plf)
+ TRACE("lfFaceName = %s lfCharset = %d\n", debugstr_w(plf->lfFaceName),
+ plf->lfCharSet);
fe32.lpLogFontParam = plf;
fe32.lpEnumFunc = efproc;
fe32.lpData = lParam;
--
1.5.2.4
More information about the wine-patches
mailing list