[lasem] svg_filter: avoid warning for invalid cast.



commit b8e160f92830cd664dd9e3d46d0398812f736842
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Sat Aug 14 17:07:56 2010 +0200

    svg_filter: avoid warning for invalid cast.

 src/lsmsvgfilterelement.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/lsmsvgfilterelement.c b/src/lsmsvgfilterelement.c
index 7db46c8..2371d45 100644
--- a/src/lsmsvgfilterelement.c
+++ b/src/lsmsvgfilterelement.c
@@ -36,7 +36,8 @@ lsm_svg_filter_element_get_node_name (LsmDomNode *node)
 static gboolean
 lsm_svg_filter_element_can_append_child (LsmDomNode *self, LsmDomNode *child)
 {
-	return (lsm_svg_element_get_category (LSM_SVG_ELEMENT (child)) == LSM_SVG_ELEMENT_CATEGORY_FILTER_PRIMITIVE);
+	return (LSM_IS_SVG_ELEMENT (child) &&
+		lsm_svg_element_get_category (LSM_SVG_ELEMENT (child)) == LSM_SVG_ELEMENT_CATEGORY_FILTER_PRIMITIVE);
 }
 
 /* LsmSvgElement implementation */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]