Fixed crash due to invalid pointer.

This commit is contained in:
Juergen Schmied 1999-07-10 10:09:58 +00:00 committed by Alexandre Julliard
parent 534d41025c
commit a904e16faa
1 changed files with 2 additions and 2 deletions

View File

@ -110,8 +110,8 @@ HMETAFILE16 MF_Create_HMETAFILE16(METAHEADER *mh)
*/ */
static METAHEADER *MF_GetMetaHeader( HMETAFILE hmf ) static METAHEADER *MF_GetMetaHeader( HMETAFILE hmf )
{ {
METAFILEOBJ *metaObj = (METAFILEOBJ *)GDI_GetObjPtr( hmf, METAFILE_MAGIC ); METAFILEOBJ * metaObj = (METAFILEOBJ *)GDI_GetObjPtr( hmf, METAFILE_MAGIC );
return metaObj->mh; return metaObj ? metaObj->mh : 0;
} }
/****************************************************************** /******************************************************************