summaryrefslogtreecommitdiffstats
path: root/src/xml/repr.h
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2013-04-08 06:10:27 +0000
committerKris <Kris.De.Gussem@hotmail.com>2013-04-08 06:10:27 +0000
commitfa74436561b0b28b9fa967101d44b4e7d6530871 (patch)
tree968e14c0ac64e8d8c5aaaad804b100bb7a4e0fa9 /src/xml/repr.h
parentAdded simple control to font dialog to address text on path's startOffset. Bu... (diff)
downloadinkscape-fa74436561b0b28b9fa967101d44b4e7d6530871.tar.gz
inkscape-fa74436561b0b28b9fa967101d44b4e7d6530871.zip
NULL pointer checks
(bzr r12271)
Diffstat (limited to 'src/xml/repr.h')
-rw-r--r--src/xml/repr.h8
1 files changed, 5 insertions, 3 deletions
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);
+ }
}
}