]> git.lyx.org Git - features.git/commitdiff
Fix bug #6327: Crash in new file and press PgUp button.
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 15 Nov 2009 23:45:39 +0000 (23:45 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 15 Nov 2009 23:45:39 +0000 (23:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32035 a592a061-630c-0410-9148-cb99ea01b6c8

src/TextMetrics.cpp

index 8a7d281e713c95164d29471835c22ecece403394..466942de1e7cfe4bb66475a0e52ebe64e2775ad8 100644 (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];