[vala/0.40] libvaladoc/gtkdoc-importer: Don't let parse_block_taglet() return null



commit 80e62cc23a39b566b6aed55494c43659ad280c12
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Thu Aug 27 10:41:47 2020 +0200

    libvaladoc/gtkdoc-importer: Don't let parse_block_taglet() return null
    
    This caused criticals like:
    
      valadoc_taglets_param_set_is_c_self_param: assertion 'self != NULL' failed

 libvaladoc/documentation/gtkdoccommentparser.vala | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/libvaladoc/documentation/gtkdoccommentparser.vala 
b/libvaladoc/documentation/gtkdoccommentparser.vala
index bf3be801a..cc8133d9f 100644
--- a/libvaladoc/documentation/gtkdoccommentparser.vala
+++ b/libvaladoc/documentation/gtkdoccommentparser.vala
@@ -235,15 +235,16 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
                var ic = parse_inline_content ();
                parse_docbook_spaces (false);
 
-               if (current.type != TokenType.EOF) {
-                       this.report_unexpected_token (current, "<EOF>");
-                       return null;
-               }
-
                BlockContent? taglet = factory.create_taglet (taglet_name) as BlockContent;
                assert (taglet != null);
                Paragraph paragraph = factory.create_paragraph ();
-               paragraph.content.add (ic);
+
+               if (current.type == TokenType.EOF) {
+                       paragraph.content.add (ic);
+               } else {
+                       this.report_unexpected_token (current, "<EOF>");
+               }
+
                taglet.content.add (paragraph);
                return taglet as Taglet;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]