diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2019-10-05 07:42:12 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2019-10-05 07:42:12 +0000 |
| commit | 7b2a2de1768f2dcb27b5638162d372429da6256a (patch) | |
| tree | 4878efc5e45eb692c4ea268a305e7bba9b26d5fd /src/document.cpp | |
| parent | update cmake packaging script (diff) | |
| download | inkscape-7b2a2de1768f2dcb27b5638162d372429da6256a.tar.gz inkscape-7b2a2de1768f2dcb27b5638162d372429da6256a.zip | |
Fix segfault with bad SVG file.
Fixes https://gitlab.com/inkscape/inkscape/issues/416
Diffstat (limited to 'src/document.cpp')
| -rw-r--r-- | src/document.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/document.cpp b/src/document.cpp index e1f621f9e..4ce3fe495 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -1355,7 +1355,11 @@ SPItem *SPDocument::getItemFromListAtPointBottom(unsigned int dkey, SPGroup *gro if (SP_IS_ITEM(&o)) { SPItem *item = SP_ITEM(&o); Inkscape::DrawingItem *arenaitem = item->get_arenaitem(dkey); - arenaitem->drawing().update(); + + if (arenaitem) { + arenaitem->drawing().update(); + } + if (arenaitem && arenaitem->pick(p, delta, 1) != nullptr && (take_insensitive || item->isVisibleAndUnlocked(dkey))) { if (find(list.begin(), list.end(), item) != list.end()) { |
