mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 07:38:22 +02:00
Don't return BadAlloc when trying to set a PictureFilter with no parameters when a filter with parameters was previously set.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
This commit is contained in:
parent
92fdd01d8e
commit
bc3c03a3f3
1 changed files with 1 additions and 1 deletions
|
|
@ -301,7 +301,7 @@ SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int
|
|||
if (nparams != pPicture->filter_nparams)
|
||||
{
|
||||
new_params = xalloc (nparams * sizeof (xFixed));
|
||||
if (!new_params)
|
||||
if (!new_params && nparams)
|
||||
return BadAlloc;
|
||||
xfree (pPicture->filter_params);
|
||||
pPicture->filter_params = new_params;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue