mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 08:21:38 +00:00
arcoding winetest CreateEnhMetaFileA all param can be NULL
and we fail on this. But this is only one bugfix, We need bugfix win32k now. To completed the bugfix svn path=/trunk/; revision=24130
This commit is contained in:
parent
b73a685a79
commit
ed022d17fd
1 changed files with 26 additions and 16 deletions
|
@ -194,23 +194,33 @@ CreateEnhMetaFileA(
|
|||
LPWSTR lpFileNameW, lpDescriptionW;
|
||||
HDC rc = 0;
|
||||
|
||||
Status = HEAP_strdupA2W ( &lpFileNameW, lpFileName );
|
||||
if (!NT_SUCCESS (Status))
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
else
|
||||
{
|
||||
Status = HEAP_strdupA2W ( &lpDescriptionW, lpDescription );
|
||||
if (!NT_SUCCESS (Status))
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
else
|
||||
{
|
||||
rc = NtGdiCreateEnhMetaFile (
|
||||
hdcRef, lpFileNameW, (CONST LPRECT)lpRect, lpDescriptionW );
|
||||
lpFileNameW = NULL;
|
||||
if (lpFileName != NULL)
|
||||
{
|
||||
Status = HEAP_strdupA2W ( &lpFileNameW, lpFileName );
|
||||
if (!NT_SUCCESS (Status))
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
|
||||
HEAP_free ( lpDescriptionW );
|
||||
}
|
||||
HEAP_free ( lpFileNameW );
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
lpDescriptionW = NULL;
|
||||
if (lpDescription != NULL)
|
||||
{
|
||||
Status = HEAP_strdupA2W ( &lpDescriptionW, lpDescription );
|
||||
if (!NT_SUCCESS (Status))
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = NtGdiCreateEnhMetaFile (hdcRef, lpFileNameW, (CONST LPRECT)lpRect, lpDescriptionW );
|
||||
|
||||
if (lpDescriptionW != NULL)
|
||||
HEAP_free ( lpDescriptionW );
|
||||
|
||||
if (lpFileNameW != NULL)
|
||||
HEAP_free ( lpFileNameW );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue