diff options
author | Topi Reinio <topi.reinio@qt.io> | 2021-10-15 16:33:41 +0200 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2021-10-18 10:22:20 +0200 |
commit | 0099481761e8c52236aaa3f71d10dad34391e86f (patch) | |
tree | 29304d356eaa984668a5089a02385d6fd4d18eb4 /src | |
parent | 8687e163757df00c1e64c15ad63680ed5c2f6937 (diff) |
qdoc: Fix assert on empty link target
Pick-to: 6.2 5.15
Fixes: QTBUG-97562
Change-Id: I9e2b2b3979f9c0ca22f23a1a5fef5296b2a34a00
Done-with: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qdoc/xmlgenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/xmlgenerator.cpp b/src/qdoc/xmlgenerator.cpp index 987b49f6f..a83a25143 100644 --- a/src/qdoc/xmlgenerator.cpp +++ b/src/qdoc/xmlgenerator.cpp @@ -381,6 +381,10 @@ QString XmlGenerator::linkForNode(const Node *node, const Node *relative) QString XmlGenerator::getLink(const Atom *atom, const Node *relative, const Node **node) { const QString &t = atom->string(); + + if (t.isEmpty()) + return t; + if (t.at(0) == QChar('h')) { if (t.startsWith("http:") || t.startsWith("https:")) return t; |