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



commit 9c3f8a0e4edd434ea8740fef927ea9b46fa2d6b2
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 c1b1d0ea8..a67ca3b20 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]