Просмотр исходного кода

Fix parseText crash on nil node

Zed 6 лет назад
Родитель
Сommit
e73963f9e9
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      src/parserutils.nim

+ 1 - 0
src/parserutils.nim

@@ -43,6 +43,7 @@ proc isProtected*(profile: XmlNode): bool =
   getHeader(profile).select(".Icon.Icon--protected") != nil
 
 proc parseText*(text: XmlNode; skipLink=""): string =
+  if text == nil: return
   for el in text:
     case el.kind
     of xnText: