From 48e0423afcb02fe4a0f705d828a0dbdb3106b397 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 8 May 2015 15:46:25 +0200 Subject: fixes a few of jenkins warnings (bzr r14126) --- src/selection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/selection.cpp') diff --git a/src/selection.cpp b/src/selection.cpp index f728f3381..7979b5d61 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -178,6 +178,7 @@ void Selection::_add(SPObject *obj) { // (to prevent double-selection) _removeObjectDescendants(obj); _removeObjectAncestors(obj); + g_return_if_fail(SP_IS_OBJECT(obj)); _objs.push_front(obj); _objs_set.insert(obj); @@ -483,7 +484,7 @@ std::vector Selection::getSnapPoints(SnapPreferenc void Selection::_removeObjectDescendants(SPObject *obj) { std::vector toremove; for ( std::list::const_iterator iter=_objs.begin();iter!=_objs.end();iter++ ) { - SPObject *sel_obj= *iter; + SPObject *sel_obj= dynamic_cast(*iter); SPObject *parent = sel_obj->parent; while (parent) { if ( parent == obj ) { -- cgit v1.2.3