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);