mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
getSelections can return empty ldomXRangeList
This commit is contained in:
committed by
Qingping Hou
parent
9c4a7ab860
commit
24d4b82f2d
5
cre.cpp
5
cre.cpp
@@ -421,6 +421,11 @@ static int getPageLinks(lua_State *L) {
|
||||
|
||||
ldomXRangeList links;
|
||||
ldomXRangeList & sel = doc->text_view->getDocument()->getSelections();
|
||||
|
||||
if ( sel.length() == 0 ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
doc->text_view->getCurrentPageLinks( links );
|
||||
int linkCount = links.length();
|
||||
if ( linkCount ) {
|
||||
|
||||
Reference in New Issue
Block a user