[PATCH] riched20: removed unneeded NULL check (Coverity)
Marcus Meissner
marcus at jet.franken.de
Thu Jan 29 02:26:40 CST 2009
Hi,
CID 862, editor is dereferenced before this check and actually is always
assumed to be non-NULL (except for WM_NCDESTROY) in this function.
There are some callers in txtsrv.c that do not explicitly check editor
before calling, but even those assume editor is non-NULL.
Ciao, Marcus
---
dlls/riched20/editor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 4495fb4..574118a 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -4059,7 +4059,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
origNPos = editor->vert_si.nPos;
lineHeight = 24;
- if (editor && editor->pBuffer && editor->pBuffer->pDefaultStyle)
+ if (editor->pBuffer && editor->pBuffer->pDefaultStyle)
lineHeight = editor->pBuffer->pDefaultStyle->tm.tmHeight;
if (lineHeight <= 0) lineHeight = 24;
--
1.5.6
More information about the wine-patches
mailing list