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/grid-snapper.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/grid-snapper.cpp') diff --git a/src/grid-snapper.cpp b/src/grid-snapper.cpp index f1d4e4bf6..419dc4b82 100644 --- a/src/grid-snapper.cpp +++ b/src/grid-snapper.cpp @@ -39,6 +39,10 @@ Inkscape::LineSnapper::LineList Inkscape::GridSnapper::_getSnapLines(NR::Point c { LineList s; + if ( NULL == _named_view ) { + return s; + } + SPCGrid *griditem = NULL; for (GSList *l = _named_view->gridviews; l != NULL; l = l->next) { // FIXME : this is a hack since there is only one view for now -- cgit v1.2.3