From 5ada07fb3839c97fbb1c1b18dc9a8ca2b43ceb16 Mon Sep 17 00:00:00 2001 From: dvlierop2 Date: Sun, 23 Nov 2008 19:39:52 +0000 Subject: [PATCH] Don't use SP_ACTIVE_DESKTOP --- src/snapper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/snapper.cpp b/src/snapper.cpp index 79f30fa3c..3dd58737e 100644 --- a/src/snapper.cpp +++ b/src/snapper.cpp @@ -41,7 +41,9 @@ void Inkscape::Snapper::setSnapperTolerance(Geom::Coord const d) */ Geom::Coord Inkscape::Snapper::getSnapperTolerance() const { - return _snapper_tolerance / SP_ACTIVE_DESKTOP->current_zoom(); + SPDesktop const *dt = _snapmanager->getDesktop(); + double const zoom = dt ? dt->current_zoom() : 1; + return _snapper_tolerance / zoom; } bool Inkscape::Snapper::getSnapperAlwaysSnap() const -- 2.30.2