Fix bug #6327: Crash in new file and press PgUp button.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32035 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-11-15 23:45:39 +00:00
parent f4125a65c0
commit a9ae2abb7e

View File

@ -1462,7 +1462,7 @@ Row const & TextMetrics::getPitAndRowNearY(int & y, pit_type & pit,
if (rit != rlast) {
y = yy + rit->height();
++rit;
} else if (pit != int(par_metrics_.size())) {
} else if (pit < int(text_->paragraphs().size()) - 1) {
++pit;
newParMetricsDown();
ParagraphMetrics const & pm2 = par_metrics_[pit];