]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Build backing Vala.SourceFile for GIRs processed by importer
authorCorentin Noël <corentin@elementary.io>
Sat, 19 Jan 2019 14:05:48 +0000 (15:05 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 21 Jan 2019 12:59:27 +0000 (13:59 +0100)
This fixes criticals when reporting errors and warnings

Fixes https://gitlab.gnome.org/GNOME/vala/issues/738

libvaladoc/importer/girdocumentationimporter.vala

index 8e4b6d4c0e713fd6c24b5e1c9efca3d9c3e52008..2b02798ad52b78db17abacfe812396bb929d2418 100644 (file)
@@ -63,8 +63,9 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
        }
 
        public override void process (string source_file) {
+               var data = new Vala.SourceFile (tree.context, Vala.SourceFileType.PACKAGE, Path.get_basename (source_file));
                this.file = new Api.SourceFile (new Api.Package (Path.get_basename (source_file), true, null),
-                                                                               source_file, null, null);
+                                                                               source_file, null, data);
                this.reader = new Vala.MarkupReader (source_file);
 
                // xml prolog