From fa74436561b0b28b9fa967101d44b4e7d6530871 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Mon, 8 Apr 2013 08:10:27 +0200 Subject: NULL pointer checks (bzr r12271) --- src/xml/repr.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/xml') diff --git a/src/xml/repr.h b/src/xml/repr.h index 52f07d11f..e691eaa7f 100644 --- a/src/xml/repr.h +++ b/src/xml/repr.h @@ -98,9 +98,11 @@ void sp_repr_css_print(SPCSSAttr *css); /* Utility finctions */ /// Remove \a repr from children of its parent node. inline void sp_repr_unparent(Inkscape::XML::Node *repr) { - Inkscape::XML::Node *parent=repr->parent(); - if (parent) { - parent->removeChild(repr); + if (repr) { + Inkscape::XML::Node *parent=repr->parent(); + if (parent) { + parent->removeChild(repr); + } } } -- cgit v1.2.3