user32: Don't call CreateDesktop() with an empty desktop name.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
01ac2e48b1
commit
42e50e44f4
|
@ -196,7 +196,8 @@ static const WCHAR *get_default_desktop(void)
|
|||
len = sizeof(buffer);
|
||||
if (!RegQueryValueExW( appkey, desktopW, 0, NULL, (LPBYTE)buffer, &len )) ret = buffer;
|
||||
RegCloseKey( appkey );
|
||||
if (ret) return ret;
|
||||
if (ret && *ret) return ret;
|
||||
ret = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,7 +210,7 @@ static const WCHAR *get_default_desktop(void)
|
|||
len = sizeof(buffer);
|
||||
if (!RegQueryValueExW( appkey, desktopW, 0, NULL, (LPBYTE)buffer, &len )) ret = buffer;
|
||||
RegCloseKey( appkey );
|
||||
if (ret) return ret;
|
||||
if (ret && *ret) return ret;
|
||||
}
|
||||
return defaultW;
|
||||
}
|
||||
|
|
|
@ -732,7 +732,7 @@ static const WCHAR *get_default_desktop_name(void)
|
|||
/* @@ Wine registry key: HKCU\Software\Wine\Explorer */
|
||||
if (!RegOpenKeyW( HKEY_CURRENT_USER, explorer_keyW, &hkey ))
|
||||
{
|
||||
if (!RegQueryValueExW( hkey, desktopW, 0, NULL, (LPBYTE)buffer, &size )) ret = buffer;
|
||||
if (!RegQueryValueExW( hkey, desktopW, 0, NULL, (LPBYTE)buffer, &size ) && *buffer) ret = buffer;
|
||||
RegCloseKey( hkey );
|
||||
}
|
||||
return ret;
|
||||
|
@ -974,7 +974,7 @@ void manage_desktop( WCHAR *arg )
|
|||
|
||||
/* parse the desktop option */
|
||||
/* the option is of the form /desktop=name[,widthxheight[,driver]] */
|
||||
if (*arg == '=' || *arg == ',')
|
||||
if ((arg[0] == '=' || arg[0] == ',') && arg[1] && arg[1] != ',')
|
||||
{
|
||||
arg++;
|
||||
name = arg;
|
||||
|
|
Loading…
Reference in New Issue