summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2012-06-04 09:48:05 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-04 10:06:17 +0200
commite0bdcf1fc44f74cda0a8a0fe5323129eb3f09fb4 (patch)
tree8c291fab7e25cde2d6bfd1fa3fcfc4e0a0f976f3 /src/tools
parentb6535f65e1fa35a7088bdb577bfd828295ef4b88 (diff)
QDoc: check if !isNull() before casting prev/next nodes.
Change-Id: Ifac095ef0af0b483fbf53c6a18cf3c3130d37710 Reviewed-by: Martin Smith <martin.smith@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index 9bb64d41ef..a9182c2231 100644
--- a/src/tools/qdoc/ditaxmlgenerator.cpp
+++ b/src/tools/qdoc/ditaxmlgenerator.cpp
@@ -2414,7 +2414,7 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
if (node->links().contains(Node::PreviousLink)) {
linkPair = node->links()[Node::PreviousLink];
linkNode = findNodeForTarget(linkPair.first, node, marker);
- if (linkNode->type() == Node::Fake) {
+ if (linkNode && linkNode->type() == Node::Fake) {
const FakeNode *fakeNode = static_cast<const FakeNode*>(linkNode);
linkPair.second = fakeNode->title();
}
@@ -2423,7 +2423,7 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
if (node->links().contains(Node::NextLink)) {
linkPair = node->links()[Node::NextLink];
linkNode = findNodeForTarget(linkPair.first, node, marker);
- if (linkNode->type() == Node::Fake) {
+ if (linkNode && linkNode->type() == Node::Fake) {
const FakeNode *fakeNode = static_cast<const FakeNode*>(linkNode);
linkPair.second = fakeNode->title();
}
@@ -2432,7 +2432,7 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
if (node->links().contains(Node::StartLink)) {
linkPair = node->links()[Node::StartLink];
linkNode = findNodeForTarget(linkPair.first, node, marker);
- if (linkNode->type() == Node::Fake) {
+ if (linkNode && linkNode->type() == Node::Fake) {
const FakeNode *fakeNode = static_cast<const FakeNode*>(linkNode);
linkPair.second = fakeNode->title();
}