QDoc: check if !isNull() before casting prev/next nodes.

Change-Id: Ifac095ef0af0b483fbf53c6a18cf3c3130d37710
Reviewed-by: Martin Smith <martin.smith@nokia.com>
This commit is contained in:
Casper van Donderen 2012-06-04 09:48:05 +02:00 committed by Qt by Nokia
parent b6535f65e1
commit e0bdcf1fc4

View File

@ -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();
}