diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2014-01-08 23:52:26 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2014-01-08 23:52:26 +0000 |
| commit | 04a1254e7a88d0bb7e2fd5f68779d086bf93e4b3 (patch) | |
| tree | d052867def55c56cae7a41ad254454a94c68e961 /src/preferences.cpp | |
| parent | suppress compiler warnings (diff) | |
| download | inkscape-04a1254e7a88d0bb7e2fd5f68779d086bf93e4b3.tar.gz inkscape-04a1254e7a88d0bb7e2fd5f68779d086bf93e4b3.zip | |
add null check: should fix bug #1163241 (inkscape crashed with SIGSEGV in Inkscape::Preferences::_getNode())
(bzr r12902)
Diffstat (limited to 'src/preferences.cpp')
| -rw-r--r-- | src/preferences.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/preferences.cpp b/src/preferences.cpp index 0dcebbb90..b4b873dc8 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -668,6 +668,9 @@ Inkscape::XML::Node *Preferences::_getNode(Glib::ustring const &pref_key, bool c // No longer necessary, can cause problems with input devices which have a dot in the name // g_assert( pref_key.find('.') == Glib::ustring::npos ); + if (_prefs_doc == NULL){ + return NULL; + } Inkscape::XML::Node *node = _prefs_doc->root(); Inkscape::XML::Node *child = NULL; gchar **splits = g_strsplit(pref_key.c_str(), "/", 0); |
