mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:45:40 +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;
|
LPWSTR lpFileNameW, lpDescriptionW;
|
||||||
HDC rc = 0;
|
HDC rc = 0;
|
||||||
|
|
||||||
Status = HEAP_strdupA2W ( &lpFileNameW, lpFileName );
|
lpFileNameW = NULL;
|
||||||
if (!NT_SUCCESS (Status))
|
if (lpFileName != NULL)
|
||||||
SetLastError (RtlNtStatusToDosError(Status));
|
{
|
||||||
else
|
Status = HEAP_strdupA2W ( &lpFileNameW, lpFileName );
|
||||||
{
|
if (!NT_SUCCESS (Status))
|
||||||
Status = HEAP_strdupA2W ( &lpDescriptionW, lpDescription );
|
SetLastError (RtlNtStatusToDosError(Status));
|
||||||
if (!NT_SUCCESS (Status))
|
|
||||||
SetLastError (RtlNtStatusToDosError(Status));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rc = NtGdiCreateEnhMetaFile (
|
|
||||||
hdcRef, lpFileNameW, (CONST LPRECT)lpRect, lpDescriptionW );
|
|
||||||
|
|
||||||
HEAP_free ( lpDescriptionW );
|
return rc;
|
||||||
}
|
}
|
||||||
HEAP_free ( lpFileNameW );
|
|
||||||
}
|
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;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue