From 4f4e78ae0cc15427867aff3cefd7200e6d8303b0 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 16 Apr 2018 12:04:00 +0300 Subject: [PATCH] Fix another nil pointer panic in the HTML parser (ref #20) --- ui/messages/parser/htmlparser.go | 3 +++ 1 file changed, 3 insertions(+) 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":