From 602e6753753ef0e897a9fd7ce46956baca1de510 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Sat, 2 Feb 2008 13:36:18 +0000 Subject: [PATCH] msvfw32: Avoid possible dereference of NULL pointer (Coverity). --- dlls/msvfw32/drawdib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/msvfw32/drawdib.c b/dlls/msvfw32/drawdib.c index 3b308237f2f..137716de3ed 100644 --- a/dlls/msvfw32/drawdib.c +++ b/dlls/msvfw32/drawdib.c @@ -133,6 +133,8 @@ BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd) TRACE("(%p)\n", hdd); + if (!whdd) return FALSE; + whdd->hpal = 0; /* Do not free this */ whdd->hdc = 0; HeapFree(GetProcessHeap(), 0, whdd->lpbi);