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:
Pierre-Loup A. Griffais 2008-07-22 17:34:37 -07:00 committed by Aaron Plattner
parent 92fdd01d8e
commit bc3c03a3f3

View File

@ -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;