branch: Fix bug #7376: Crash when deleting an Inset and using dbg -any.

see r38011.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@38472 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2011-04-21 19:15:02 +00:00
parent a5fac4bd4f
commit dfd5325e8f
2 changed files with 9 additions and 4 deletions

View File

@ -51,11 +51,14 @@ void CoordCache::clear()
void CoordCache::dump() const
{
LYXERR0("InsetCache contains:");
for (CoordCacheBase<Inset>::cache_type::const_iterator it = getInsets().getData().begin(); it != getInsets().getData().end(); ++it) {
Inset const * inset = it->first;
CoordCacheBase<Inset>::cache_type::const_iterator it =
getInsets().getData().begin();
for (; it != getInsets().getData().end(); ++it) {
// Warning: it is not guaranteed that inset is a valid pointer
// (therefore it has type 'void *') (see bug #7376).
void const * inset = it->first;
Point const p = it->second.pos;
LYXERR0("Inset " << inset << "(" << to_utf8(inset->name())
<< ") has point " << p.x_ << "," << p.y_);
LYXERR0("Inset " << inset << " has point " << p.x_ << "," << p.y_);
}
}

View File

@ -79,6 +79,8 @@ What's new
- Fix a crash when moving the cursor up when there is an inset right
above cursor which is not placed at the beginning of the line (bug 7261).
- Fix a crash when deleting an inset and using -dbg any (bug 7376).
- Fix assertion when selecting with shift+click immediately after reverse
search, accept/reject all changes, or page down/up operations (bug 7394).