From e5738bba197fec55b5cecd83c56be0a46fd006b6 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 6 Apr 2007 20:12:18 +0000 Subject: Additional null pointer checking (bzr r2827) --- src/inkscape.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/inkscape.cpp') 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"))); -- cgit v1.2.3