aboutsummaryrefslogtreecommitdiff
path: root/ui/messages/parser
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-16 12:04:00 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-16 12:04:00 +0300
commit4f4e78ae0cc15427867aff3cefd7200e6d8303b0 (patch)
tree56e209c4a812d2787402db1a834efe957484a0be /ui/messages/parser
parent0d4d597909a47f5e0d0171b1c2f322085eacee57 (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.go3
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":