]> 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>
Thu, 27 Aug 2020 08:02:19 +0000 (10:02 +0200)
This caused criticals like:

  g_uri_parse_scheme: assertion 'uri != NULL' failed

libvaladoc/documentation/gtkdoccommentparser.vala

index 20535b764e21981c7ed785dc1c9e1defcfb1a7fc..c1b1d0ea82dfbf2beb3803f6bd719eab4fd6ab0f 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