Trying to fix #7321: add some assertions.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37914 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2011-03-13 16:26:57 +00:00
parent 00a10facd2
commit 076151f508
2 changed files with 2 additions and 0 deletions

View File

@ -2244,6 +2244,7 @@ TextMetrics const & BufferView::textMetrics(Text const * t) const
TextMetrics & BufferView::textMetrics(Text const * t)
{
LASSERT(t, /**/);
TextMetricsCache::iterator tmc_it = d->text_metrics_.find(t);
if (tmc_it == d->text_metrics_.end()) {
tmc_it = d->text_metrics_.insert(

View File

@ -158,6 +158,7 @@ pair<pit_type, ParagraphMetrics const *> TextMetrics::first() const
pair<pit_type, ParagraphMetrics const *> TextMetrics::last() const
{
LASSERT(!par_metrics_.empty(), /**/);
ParMetricsCache::const_reverse_iterator it = par_metrics_.rbegin();
return make_pair(it->first, &it->second);
}