[librsvg] NULL check before dereference
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] NULL check before dereference
- Date: Mon, 28 Nov 2011 12:47:19 +0000 (UTC)
commit dccf2281f56d893551bf8ba76ce6e131ea66c749
Author: Christian Persch <chpe gnome org>
Date: Sun Nov 27 21:40:23 2011 +0100
NULL check before dereference
... not afterwards!
rsvg-filter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index cfc575c..4d4d0d3 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]