From: dvlierop2 Date: Sun, 23 Nov 2008 19:39:52 +0000 (+0000) Subject: Don't use SP_ACTIVE_DESKTOP X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ada07fb3839c97fbb1c1b18dc9a8ca2b43ceb16;p=inkscape.git Don't use SP_ACTIVE_DESKTOP --- 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