mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 18:52:46 +00:00
Avoid deferencing a null pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30805 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
56ba7b60b1
commit
3e9489d870
@ -115,7 +115,8 @@ TeXEnvironment(Buffer const & buf,
|
||||
ParagraphList::const_iterator const priorpit =
|
||||
pit == paragraphs.begin() ? pit : boost::prior(pit);
|
||||
|
||||
bool const use_prev_env_language = priorpit->layout().isEnvironment()
|
||||
bool const use_prev_env_language = prev_env_language_ != 0
|
||||
&& priorpit->layout().isEnvironment()
|
||||
&& (priorpit->getDepth() > pit->getDepth()
|
||||
|| (priorpit->getDepth() == pit->getDepth()
|
||||
&& priorpit->layout() != pit->layout()));
|
||||
@ -352,7 +353,8 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
|
||||
// environment with nesting depth greater than (or equal to, but with
|
||||
// a different layout) the current one. If there is no previous
|
||||
// paragraph, the previous language is the outer language.
|
||||
bool const use_prev_env_language = priorpit->layout().isEnvironment()
|
||||
bool const use_prev_env_language = prev_env_language_ != 0
|
||||
&& priorpit->layout().isEnvironment()
|
||||
&& (priorpit->getDepth() > pit->getDepth()
|
||||
|| (priorpit->getDepth() == pit->getDepth()
|
||||
&& priorpit->layout() != pit->layout()));
|
||||
|
Loading…
Reference in New Issue
Block a user