fix inInset crash

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9609 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-02-10 20:15:14 +00:00
parent 72dccb8869
commit b7665042ff
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2005-02-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* text2.C (setCounter): check for inInset() == 0
2005-02-09 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView_pimpl.C (dispatch): handle LFUN_GOTO_PARAGRAPH here,

View File

@ -791,8 +791,9 @@ void LyXText::setCounter(Buffer const & buf, pit_type pit)
bool isOK = false;
while (tmppit != end) {
in = pars_[tmppit].inInset();
if (in->lyxCode() == InsetBase::FLOAT_CODE ||
in->lyxCode() == InsetBase::WRAP_CODE) {
if (in &&
(in->lyxCode() == InsetBase::FLOAT_CODE ||
in->lyxCode() == InsetBase::WRAP_CODE)) {
isOK = true;
break;
}