From bc3c03a3f3c091026310f0e8d55321cec570a0c5 Mon Sep 17 00:00:00 2001 From: "Pierre-Loup A. Griffais" Date: Tue, 22 Jul 2008 17:34:37 -0700 Subject: [PATCH] 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 --- render/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;