From c03f3dab98e24f608e3e57c9343f2302897c6ecf Mon Sep 17 00:00:00 2001 From: Andrius Ramanauskas Date: Thu, 4 May 2006 11:13:11 +0000 Subject: Temporary fix for broken snap functionality: as named view constructor is never called, virtual tables of Snapper derived classes are never initialized. Fix - calling constructor/destructor on SPNamedView init/release. (bzr r725) --- src/object-snapper.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 6146c11b8..9a3f61525 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -144,6 +144,10 @@ void Inkscape::ObjectSnapper::_snapPaths(Inkscape::SnappedPoint &s, Inkscape::SnappedPoint Inkscape::ObjectSnapper::_doFreeSnap(NR::Point const &p, std::list const &it) const { + if ( NULL == _named_view ) { + return SnappedPoint(p, NR_HUGE); + } + /* Get a list of all the SPItems that we will try to snap to */ std::list cand; _findCandidates(cand, sp_document_root(_named_view->document), it, p); -- cgit v1.2.3