diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-04-16 12:04:00 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-04-16 12:04:00 +0300 |
commit | 4f4e78ae0cc15427867aff3cefd7200e6d8303b0 (patch) | |
tree | 56e209c4a812d2787402db1a834efe957484a0be /ui/messages/parser | |
parent | 0d4d597909a47f5e0d0171b1c2f322085eacee57 (diff) |
Fix another nil pointer panic in the HTML parser (ref #20)
Diffstat (limited to 'ui/messages/parser')
-rw-r--r-- | ui/messages/parser/htmlparser.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/messages/parser/htmlparser.go b/ui/messages/parser/htmlparser.go index 9ca707f..4f3522a 100644 --- a/ui/messages/parser/htmlparser.go +++ b/ui/messages/parser/htmlparser.go @@ -118,6 +118,9 @@ func (parser *MatrixHTMLProcessor) HandleSelfClosingTag(tagName string, attrs ma func (parser *MatrixHTMLProcessor) HandleEndTag(tagName string) { tag := parser.openTags.Pop(tagName) + if tag == nil { + return + } switch tag.Tag { case "li", "blockquote": |