summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2013-11-24 14:10:03 -0500
committerShaun McCance <shaunm@gnome.org>2013-11-24 14:10:03 -0500
commit46067ed60cbe1e5e3efe176da1f40f8219336490 (patch)
tree3463e8958dceaff1321f27bd6bb9c47409083473
parent6d90f59ee2fcd9492501b337a15c65bfce78afcd (diff)
downloaditstool-46067ed60cbe1e5e3efe176da1f40f8219336490.tar.gz
Fixed crash in locale filter and drop rule, #715116
When the dropped node has no preceding sibling, itstool crashes because it tries to unlink prev node if it's blank.
-rwxr-xr-xitstool.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/itstool.in b/itstool.in
index 150b395..a04ab2b 100755
--- a/itstool.in
+++ b/itstool.in
@@ -859,7 +859,7 @@ class Document (object):
prev = node.prev
node.unlinkNode()
node.freeNode()
- if prev.isBlankNode():
+ if prev is not None and prev.isBlankNode():
prev.unlinkNode()
prev.freeNode()
return
@@ -914,7 +914,7 @@ class Document (object):
prev = node.prev
node.unlinkNode()
node.freeNode()
- if prev.isBlankNode():
+ if prev is not None and prev.isBlankNode():
prev.unlinkNode()
prev.freeNode()
return