]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc/gtkdoc-importer: Correctly retrieve "url" from "ulink" elements
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 27 Aug 2020 08:02:19 +0000 (10:02 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 5 Sep 2020 14:42:41 +0000 (16:42 +0200)
This caused criticals like:

  g_uri_parse_scheme: assertion 'uri != NULL' failed

libvaladoc/documentation/gtkdoccommentparser.vala

index ede991ce8769117f42baedd811801aad397235a6..bf3be801af5aa1dd14cd0d5bc58faf4b1e9cf0d3 100644 (file)
@@ -358,7 +358,12 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
                }
 
                StringBuilder builder = new StringBuilder ();
-               string url = current.attributes.get ("linkend");
+               string url;
+               if (is_internal) {
+                       url = current.attributes.get ("linkend");
+               } else {
+                       url = current.attributes.get ("url");
+               }
                next ();
 
                // TODO: check xml