mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-31 07:45:44 +00:00
Fix crash due to invalid pos
This commit is contained in:
parent
480f8d3115
commit
8226453684
@ -872,7 +872,7 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
default:
|
default:
|
||||||
// we don't need it for the last paragraph!!!
|
// we don't need it for the last paragraph!!!
|
||||||
// or if the last thing is an environment separator
|
// or if the last thing is an environment separator
|
||||||
if (nextpar && !par.isEnvSeparator(par.size() - 1))
|
if (nextpar && par.size() > 0 && !par.isEnvSeparator(par.size() - 1))
|
||||||
pending_newline = true;
|
pending_newline = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1018,7 +1018,7 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
// we don't need a newline for the last paragraph!!!
|
// we don't need a newline for the last paragraph!!!
|
||||||
// Note from JMarc: we will re-add a \n explicitly in
|
// Note from JMarc: we will re-add a \n explicitly in
|
||||||
// TeXEnvironment, because it is needed in this case
|
// TeXEnvironment, because it is needed in this case
|
||||||
if (nextpar && !par.isEnvSeparator(par.size() - 1)) {
|
if (nextpar && par.size() > 0 && !par.isEnvSeparator(par.size() - 1)) {
|
||||||
// Make sure to start a new line
|
// Make sure to start a new line
|
||||||
os << breakln;
|
os << breakln;
|
||||||
Layout const & next_layout = nextpar->layout();
|
Layout const & next_layout = nextpar->layout();
|
||||||
|
Loading…
Reference in New Issue
Block a user