Code

remove deprecation warnings
[inkscape.git] / src / guide-snapper.cpp
index e247c0451ae843dfd1c7039d738fbcca7ffe96d1..a05ecd3e6b4423c517710c83b21965540dd0d5f9 100644 (file)
@@ -7,7 +7,7 @@
  *   Frank Felfe <innerspace@iname.com>
  *   Carl Hetherington <inkscape@carlh.net>
  *
- * Copyright (C) 1999-2002 Authors 
+ * Copyright (C) 1999-2002 Authors
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
@@ -25,7 +25,11 @@ Inkscape::GuideSnapper::GuideSnapper(SPNamedView const *nv, NR::Coord const d) :
 Inkscape::GuideSnapper::LineList Inkscape::GuideSnapper::_getSnapLines(NR::Point const &p) const
 {
     LineList s;
-    
+
+    if ( NULL == _named_view ) {
+        return s;
+    }
+
     for (GSList const *l = _named_view->guides; l != NULL; l = l->next) {
         SPGuide const *g = SP_GUIDE(l->data);