summaryrefslogtreecommitdiffstats
path: root/src/object/sp-item.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-09-12 18:25:58 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-09-12 18:25:58 +0000
commite326f90d2112c84e99c13372a91a7279c6f0cdf7 (patch)
tree16649f91e4608b28a7605572e7686c118ebefd0c /src/object/sp-item.cpp
parentAdd detachable, although no evidence it works (diff)
downloadinkscape-e326f90d2112c84e99c13372a91a7279c6f0cdf7.tar.gz
inkscape-e326f90d2112c84e99c13372a91a7279c6f0cdf7.zip
fix object-set-test crash
Diffstat (limited to 'src/object/sp-item.cpp')
-rw-r--r--src/object/sp-item.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp
index 474687cc6..e6f4c4239 100644
--- a/src/object/sp-item.cpp
+++ b/src/object/sp-item.cpp
@@ -918,9 +918,10 @@ Geom::OptRect SPItem::desktopGeometricBounds() const
Geom::OptRect SPItem::desktopVisualBounds() const
{
- Geom::Affine const& m = SP_ACTIVE_DESKTOP->doc2dt();
Geom::OptRect ret = documentVisualBounds();
- if (ret) *ret *= m;
+ if (ret && SP_ACTIVE_DESKTOP) {
+ *ret *= SP_ACTIVE_DESKTOP->doc2dt();
+ }
return ret;
}