]> git.lyx.org Git - lyx.git/blobdiff - src/DocIterator.cpp
tex2lyx/text.cpp: fix 2 typos
[lyx.git] / src / DocIterator.cpp
index 0555a9f75f1db9dc2b467c22ee80f54415e4becf..310b85131ba8e1e3fe16eeaf69e58713d62cfc47 100644 (file)
@@ -196,8 +196,10 @@ FontSpan DocIterator::locateWord(word_location const loc) const
 {
        FontSpan f = FontSpan();
 
-       f.first = pos();
-       top().paragraph().locateWord(f.first, f.last, loc);
+       if (!top().text()->empty()) {
+               f.first = pos();
+               top().paragraph().locateWord(f.first, f.last, loc);
+       }
        return f;
 }