mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-05 06:30:29 +01:00
randr: handle RRSetCrtcConfigs request with zero configs
Need to actually return a reply in this case. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
This commit is contained in:
parent
b0f4bd61f0
commit
0d01b66df9
1 changed files with 3 additions and 5 deletions
|
|
@ -1750,9 +1750,6 @@ ProcRRSetCrtcConfigs (ClientPtr client)
|
|||
screen_config.mm_width = stuff->widthInMillimeters;
|
||||
screen_config.mm_height = stuff->heightInMillimeters;
|
||||
|
||||
if (num_configs == 0)
|
||||
return Success;
|
||||
|
||||
output_ids = (RROutput *) (x_configs + num_configs);
|
||||
|
||||
/*
|
||||
|
|
@ -1760,7 +1757,7 @@ ProcRRSetCrtcConfigs (ClientPtr client)
|
|||
* server crtc configurations
|
||||
*/
|
||||
configs = calloc(num_configs, sizeof (RRCrtcConfigRec));
|
||||
if (!configs)
|
||||
if (num_configs > 0 && configs == NULL)
|
||||
return BadAlloc;
|
||||
for (i = 0; i < num_configs; i++) {
|
||||
rc = RRConvertCrtcConfig(client, screen, &screen_config,
|
||||
|
|
@ -1773,7 +1770,8 @@ ProcRRSetCrtcConfigs (ClientPtr client)
|
|||
output_ids += x_configs[i].nOutput;
|
||||
}
|
||||
|
||||
if (!RRSetCrtcConfigs (screen, &screen_config, configs, num_configs))
|
||||
if (num_configs &&
|
||||
!RRSetCrtcConfigs (screen, &screen_config, configs, num_configs))
|
||||
{
|
||||
rep.status = RRSetConfigFailed;
|
||||
goto sendReply;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue