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

View File

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