X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d0294308d8d021360c84b92535b8dbc15fb0d66..fa482912e420a40e9f2e55a0f5407562826dd15e:/utils/wxPython/lib/wxpTag.py diff --git a/utils/wxPython/lib/wxpTag.py b/utils/wxPython/lib/wxpTag.py index afdfd4c1be..4cc06d6eff 100644 --- a/utils/wxPython/lib/wxpTag.py +++ b/utils/wxPython/lib/wxpTag.py @@ -163,14 +163,17 @@ class wxpTagHandler(wxHtmlWinTagHandler): self.ParseInner(tag) # create the object - obj = apply(self.ctx.classObj, - (self.GetParser().GetWindow(),), - self.ctx.kwargs) - obj.Show(true) + parent = self.GetParser().GetWindow() + if parent: + obj = apply(self.ctx.classObj, + (parent,), + self.ctx.kwargs) + obj.Show(true) + + # add it to the HtmlWindow + self.GetParser().GetContainer().InsertCell(wxHtmlWidgetCell(obj, self.ctx.floatWidth)) + self.ctx = None - # add it to the HtmlWindow - self.GetParser().GetContainer().InsertCell(wxHtmlWidgetCell(obj, self.ctx.floatWidth)) - self.ctx = None return true