ole32: Fix the condition in HMETAFILEPICT_UserFree to match that in METAFILEPICT_UserMarshal.

Actually free the memory.
This commit is contained in:
Rob Shearman 2007-11-12 20:11:09 +00:00 committed by Alexandre Julliard
parent 8ee930150c
commit da04018608
1 changed files with 4 additions and 2 deletions

View File

@ -1420,14 +1420,16 @@ void __RPC_USER HMETAFILEPICT_UserFree(ULONG *pFlags, HMETAFILEPICT *phMfp)
{
TRACE("(%s, &%p)\n", debugstr_user_flags(pFlags), *phMfp);
if ((LOWORD(*pFlags) == MSHCTX_INPROC) && *phMfp)
if ((LOWORD(*pFlags) != MSHCTX_INPROC) && *phMfp)
{
METAFILEPICT *mfpict;
mfpict = GlobalLock(*phMfp);
/* FIXME: raise an exception if mfpict is NULL? */
HMETAFILE_UserFree(pFlags, &mfpict->hMF);
GlobalUnlock(*phMfp);
GlobalFree(*phMfp);
}
}