mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
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:
parent
13fa26d4f7
commit
5db7753f7b
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user