diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-02-22 10:18:37 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-02-22 10:18:37 +0000 |
| commit | 9a61d864b24fa8e9a51cbb75dbf82d61643d467e (patch) | |
| tree | b73cd0f0ff0355bf2623c554b593ba0038d02540 /src/object-snapper.cpp | |
| parent | Stop taking up vertical space when horizontal scrollbar not shown. (diff) | |
| download | inkscape-9a61d864b24fa8e9a51cbb75dbf82d61643d467e.tar.gz inkscape-9a61d864b24fa8e9a51cbb75dbf82d61643d467e.zip | |
Don't crash when the original of an SPUse can't be found. This sort of fixes LP 185734, but maybe further action would be appropriate (e.g., should we remove orphaned items from the xml tree in the first place?).
(bzr r4821)
Diffstat (limited to 'src/object-snapper.cpp')
| -rw-r--r-- | src/object-snapper.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index e320f013f..0308efe2d 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -166,6 +166,7 @@ void Inkscape::ObjectSnapper::_collectNodes(Inkscape::Snapper::PointType const & if (SP_IS_USE(*i)) { root_item = sp_use_root(SP_USE(*i)); } + g_return_if_fail(root_item); //Collect all nodes so we can snap to them if (_snap_to_itemnode) { @@ -271,6 +272,7 @@ void Inkscape::ObjectSnapper::_collectPaths(Inkscape::Snapper::PointType const & if (SP_IS_USE(*i)) { i2doc = sp_use_get_root_transform(SP_USE(*i)); root_item = sp_use_root(SP_USE(*i)); + g_return_if_fail(root_item); } else { i2doc = sp_item_i2doc_affine(*i); root_item = *i; |
