Code

Hold perspectives on document level rather than globally; this corrects the changes...
[inkscape.git] / src / inkscape.cpp
index 829aacdc989166f99afac3b7f6beaef68b88351e..c167be493c0900a05a12b9560472da180c80b6a8 100644 (file)
@@ -731,7 +731,12 @@ inkscape_get_repr (Inkscape::Application *inkscape, const gchar *key)
         return NULL;
     }
 
-    Inkscape::XML::Node *repr = Inkscape::Preferences::get()->root();
+    Inkscape::XML::Node *prefs = Inkscape::Preferences::get();
+    if ( !prefs ) {
+        return NULL;
+    }
+
+    Inkscape::XML::Node *repr = prefs->root();
     if (!repr) return NULL;
     g_assert (!(strcmp (repr->name(), "inkscape")));