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
|
@ -301,7 +301,7 @@ SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int
|
||||||
if (nparams != pPicture->filter_nparams)
|
if (nparams != pPicture->filter_nparams)
|
||||||
{
|
{
|
||||||
new_params = xalloc (nparams * sizeof (xFixed));
|
new_params = xalloc (nparams * sizeof (xFixed));
|
||||||
if (!new_params)
|
if (!new_params && nparams)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
xfree (pPicture->filter_params);
|
xfree (pPicture->filter_params);
|
||||||
pPicture->filter_params = new_params;
|
pPicture->filter_params = new_params;
|
||||||
|
|
Loading…
Reference in New Issue