2
0
mirror of https://github.com/koreader/koreader synced 2024-11-13 19:11:25 +00:00
koreader/kpvcrlib/lvdocview-getCurrentPageLinks.patch
2012-10-31 21:11:16 -04:00

15 lines
579 B
Diff

diff --git a/crengine/src/lvdocview.cpp b/crengine/src/lvdocview.cpp
index e7a355a..e1178de 100755
--- a/crengine/src/lvdocview.cpp
+++ b/crengine/src/lvdocview.cpp
@@ -4539,7 +4539,8 @@ void LVDocView::getCurrentPageLinks(ldomXRangeList & list) {
if (_list[i]->getStart().getNode() == elem)
return true; // don't add, duplicate found!
}
- _list.add(new ldomXRange(elem->getChildNode(0)));
+ ldomNode * node = elem->getChildNode(0);
+ if ( node ) _list.add(new ldomXRange(node));
}
return true;
}