diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-05-08 13:46:25 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2015-05-08 13:46:25 +0000 |
| commit | 48e0423afcb02fe4a0f705d828a0dbdb3106b397 (patch) | |
| tree | fe90975cd27d20532e0716290fe6149c801f4a5c /src/selection.cpp | |
| parent | forgotten dynamic cast (diff) | |
| download | inkscape-48e0423afcb02fe4a0f705d828a0dbdb3106b397.tar.gz inkscape-48e0423afcb02fe4a0f705d828a0dbdb3106b397.zip | |
fixes a few of jenkins warnings
(bzr r14126)
Diffstat (limited to 'src/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<Inkscape::SnapCandidatePoint> Selection::getSnapPoints(SnapPreferenc void Selection::_removeObjectDescendants(SPObject *obj) { std::vector<SPObject*> toremove; for ( std::list<SPObject*>::const_iterator iter=_objs.begin();iter!=_objs.end();iter++ ) { - SPObject *sel_obj= *iter; + SPObject *sel_obj= dynamic_cast<SPObject*>(*iter); SPObject *parent = sel_obj->parent; while (parent) { if ( parent == obj ) { |
