Code

Prevent null pointer dereferencing
authorjoncruz <joncruz@users.sourceforge.net>
Fri, 6 Apr 2007 16:11:45 +0000 (16:11 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Fri, 6 Apr 2007 16:11:45 +0000 (16:11 +0000)
src/inkscape.cpp

index af6ef4f05a125c5718c0f76a88e64e7a535072f0..829aacdc989166f99afac3b7f6beaef68b88351e 100644 (file)
@@ -727,7 +727,7 @@ inkscape_load_menus (Inkscape::Application *inkscape)
 Inkscape::XML::Node *
 inkscape_get_repr (Inkscape::Application *inkscape, const gchar *key)
 {
-    if (key == NULL) {
+    if ( (key == NULL) || (inkscape == NULL) ) {
         return NULL;
     }