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:
parent
b6535f65e1
commit
e0bdcf1fc4
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user