From d51c37d151d2e080aec01158d77eaadd0b213e13 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Sat, 13 Jan 2007 07:28:41 +0000 Subject: fixes for style-test prefs crashes (bzr r2202) --- src/xml/repr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/xml') diff --git a/src/xml/repr.h b/src/xml/repr.h index dc96cb3e6..f930ed0c5 100644 --- a/src/xml/repr.h +++ b/src/xml/repr.h @@ -143,11 +143,13 @@ Inkscape::XML::Document *sp_repr_document_new(gchar const *rootname); /// Returns root node of document. inline Inkscape::XML::Node *sp_repr_document_root(Inkscape::XML::Document const *doc) { + if (!doc) return NULL; return const_cast(doc->root()); } /// Returns the node's document. inline Inkscape::XML::Document *sp_repr_document(Inkscape::XML::Node const *repr) { + if (!repr) return NULL; return const_cast(repr->document()); } -- cgit v1.2.3