mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
wfreerdp-server: fixed crash with selected zero resolution displays
This commit is contained in:
@@ -89,7 +89,11 @@ BOOL wf_peer_post_connect(freerdp_peer* client)
|
||||
ReleaseDC(NULL, hdc);
|
||||
*/
|
||||
|
||||
if (get_screen_info(wfi->screenID, NULL, &wfi->width, &wfi->height, &wfi->bitsPerPixel) == 0)
|
||||
if (
|
||||
(get_screen_info(wfi->screenID, NULL, &wfi->width, &wfi->height, &wfi->bitsPerPixel) == 0) ||
|
||||
(wfi->width == 0) ||
|
||||
(wfi->height == 0) ||
|
||||
(wfi->bitsPerPixel == 0) )
|
||||
{
|
||||
_tprintf(_T("postconnect: error getting screen info for screen %d\n"), wfi->screenID);
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user