summaryrefslogtreecommitdiff
path: root/rsvg-filter.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2011-11-27 21:40:23 +0100
committerChristian Persch <chpe@gnome.org>2011-11-27 21:40:23 +0100
commitdccf2281f56d893551bf8ba76ce6e131ea66c749 (patch)
treeace91dd7e6fa4b2517f8e5ab9601f3132641d369 /rsvg-filter.c
parente7e5622c39157f1e6880cb24b7949344a182f5fb (diff)
downloadlibrsvg-dccf2281f56d893551bf8ba76ce6e131ea66c749.tar.gz
NULL check before dereference
... not afterwards!
Diffstat (limited to 'rsvg-filter.c')
-rw-r--r--rsvg-filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rsvg-filter.c b/rsvg-filter.c
index cfc575c1..4d4d0d3b 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -672,7 +672,7 @@ rsvg_filter_get_result (GString * name, RsvgFilterContext * ctx)
output.surface = cairo_surface_reference (rsvg_filter_get_bg (ctx));
output.Rused = output.Gused = output.Bused = output.Aused = 1;
return output;
- } else if (!strcmp (name->str, "") || !strcmp (name->str, "none") || !name) {
+ } else if (!name || !strcmp (name->str, "") || !strcmp (name->str, "none")) {
output = ctx->lastresult;
cairo_surface_reference (output.surface);
return output;