Don't use an uninitialized variable

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17255 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2007-02-19 12:38:31 +00:00
parent 13fa26d4f7
commit 5db7753f7b

View File

@ -550,7 +550,7 @@ void setLabel(Buffer const & buf, ParIterator & it, LyXTextClass const & textcla
} else if (layout->labeltype == LABEL_SENSITIVE) {
// Search for the first float or wrap inset in the iterator
size_t i = it.depth();
InsetBase * in;
InsetBase * in = 0;
while (i > 0) {
--i;
in = &it[i].inset();
@ -558,7 +558,9 @@ void setLabel(Buffer const & buf, ParIterator & it, LyXTextClass const & textcla
|| in->lyxCode() == InsetBase::WRAP_CODE)
break;
}
docstring const & type = in->getInsetName();
docstring type;
if (in)
type = in->getInsetName();
if (!type.empty()) {
Floating const & fl = textclass.floats().getType(to_ascii(type));