mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 12:00:13 +01:00
Guard against None returned for the top-level parent node
This commit is contained in:
@@ -794,6 +794,8 @@ class Paragraph(Node):
|
|||||||
section = Section(element, None, self.kind)
|
section = Section(element, None, self.kind)
|
||||||
|
|
||||||
root = self.GetTopLevelParent()
|
root = self.GetTopLevelParent()
|
||||||
|
# TODO: Why is there sometimes not a top-level parent node?
|
||||||
|
if root is not None:
|
||||||
root.AddSection(section)
|
root.AddSection(section)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user