summaryrefslogtreecommitdiffstats
path: root/src/inkscape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inkscape.cpp')
-rw-r--r--src/inkscape.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 829aacdc9..c167be493 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -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")));