Author: janderwald
Date: Mon May 26 13:13:17 2008
New Revision: 33716
URL:
http://svn.reactos.org/svn/reactos?rev=33716&view=rev
Log:
- only convert the devmode if the caller passed one
- fixes a user32_winetest crash failure
Modified:
trunk/reactos/dll/win32/user32/misc/desktop.c
Modified: trunk/reactos/dll/win32/user32/misc/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/desk…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/desktop.c [iso-8859-1] Mon May 26 13:13:17 2008
@@ -466,7 +466,7 @@
ANSI_STRING DesktopNameA;
UNICODE_STRING DesktopNameU;
HDESK hDesktop;
- LPDEVMODEW DevmodeW;
+ LPDEVMODEW DevmodeW = NULL;
if (lpszDesktop != NULL)
{
@@ -478,7 +478,10 @@
RtlInitUnicodeString(&DesktopNameU, NULL);
}
- DevmodeW = GdiConvertToDevmodeW(pDevmode);
+ if (pDevmode)
+ {
+ DevmodeW = GdiConvertToDevmodeW(pDevmode);
+ }
hDesktop = CreateDesktopW(DesktopNameU.Buffer,
NULL,