mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix Null-checking issue detected by Coverity.
This commit is contained in:
parent
3daa447c3c
commit
974553d858
@ -1429,14 +1429,12 @@ bool Paragraph::Private::latexSpecialT3(char_type const c, otexstream & os,
|
|||||||
|
|
||||||
void Paragraph::Private::validate(LaTeXFeatures & features) const
|
void Paragraph::Private::validate(LaTeXFeatures & features) const
|
||||||
{
|
{
|
||||||
Buffer const & buf = inset_owner_->buffer();
|
|
||||||
BufferParams const & bp = features.runparams().is_child
|
|
||||||
? buf.masterParams() : buf.params();
|
|
||||||
if (layout_->inpreamble && inset_owner_) {
|
if (layout_->inpreamble && inset_owner_) {
|
||||||
// FIXME: Using a string stream here circumvents the encoding
|
// FIXME: Using a string stream here circumvents the encoding
|
||||||
// switching machinery of odocstream. Therefore the
|
// switching machinery of odocstream. Therefore the
|
||||||
// output is wrong if this paragraph contains content
|
// output is wrong if this paragraph contains content
|
||||||
// that needs to switch encoding.
|
// that needs to switch encoding.
|
||||||
|
Buffer const & buf = inset_owner_->buffer();
|
||||||
otexstringstream os;
|
otexstringstream os;
|
||||||
os << layout_->preamble();
|
os << layout_->preamble();
|
||||||
size_t const length = os.length();
|
size_t const length = os.length();
|
||||||
@ -1490,6 +1488,8 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// then the contents
|
// then the contents
|
||||||
|
BufferParams const bp = features.runparams().is_child
|
||||||
|
? features.buffer().masterParams() : features.buffer().params();
|
||||||
for (pos_type i = 0; i < int(text_.size()) ; ++i) {
|
for (pos_type i = 0; i < int(text_.size()) ; ++i) {
|
||||||
char_type c = text_[i];
|
char_type c = text_[i];
|
||||||
if (c == 0x0022) {
|
if (c == 0x0022) {
|
||||||
|
Loading…
Reference in New Issue
Block a user