summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorPierre-Loup A. Griffais <pgriffais@nvidia.com>2008-07-22 17:34:37 -0700
committerAaron Plattner <aplattner@nvidia.com>2008-07-22 17:38:57 -0700
commitbc3c03a3f3c091026310f0e8d55321cec570a0c5 (patch)
tree480bf1c2d610600d6c0b71a63bba1d080849020d /render
parent92fdd01d8e46dd4b41338754e1a34e9d3c387d4a (diff)
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>
Diffstat (limited to 'render')
-rw-r--r--render/filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/render/filter.c b/render/filter.c
index 092313f6e..aa3eb1a9e 100644
--- a/render/filter.c
+++ b/render/filter.c
@@ -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;