From 1667a2469e0c015ddb514ebb943b4329e549f5eb Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 23 Nov 2009 22:14:44 +0100 Subject: [PATCH] user32: Fixed NULL ptr checks (Coverity). --- dlls/user32/dde_misc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/user32/dde_misc.c b/dlls/user32/dde_misc.c index d2de95429c..ae1df40b30 100644 --- a/dlls/user32/dde_misc.c +++ b/dlls/user32/dde_misc.c @@ -1983,7 +1983,13 @@ WDML_CONV* WDML_GetConv(HCONV hConv, BOOL checkConnected) /* FIXME: should do better checking */ if (pConv == NULL || pConv->magic != WDML_CONV_MAGIC) return NULL; - if (!pConv->instance || pConv->instance->threadID != GetCurrentThreadId()) + if (!pConv->instance) + { + WARN("wrong thread ID, no instance\n"); + return NULL; + } + + if (pConv->instance->threadID != GetCurrentThreadId()) { WARN("wrong thread ID\n"); pConv->instance->lastError = DMLERR_INVALIDPARAMETER; /* FIXME: check */