mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00: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:
committed by
Aaron Plattner
parent
92fdd01d8e
commit
bc3c03a3f3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user