mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
ChangesMonitor: beware of exceptions in destructor
There may be an exception is the paragraph does not have an owner. In this case, there is nothing to do anyway. Spotted by coverity.
This commit is contained in:
parent
bbae2c8c2a
commit
ef091ca0ea
@ -56,6 +56,7 @@
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/docstring_list.h"
|
||||
#include "support/ExceptionMessage.h"
|
||||
#include "support/gettext.h"
|
||||
#include "support/lassert.h"
|
||||
#include "support/lstrings.h"
|
||||
@ -591,10 +592,12 @@ struct ChangesMonitor {
|
||||
* 2. and we are not in the situation where the buffer has changes
|
||||
* and new changes are added to the paragraph.
|
||||
*/
|
||||
if (par_.isChanged() != was_changed_
|
||||
&& par_.inInset().isBufferValid()
|
||||
&& !(par_.inInset().buffer().areChangesPresent() && par_.isChanged()))
|
||||
par_.inInset().buffer().forceUpdate();
|
||||
try {
|
||||
if (par_.isChanged() != was_changed_
|
||||
&& par_.inInset().isBufferValid()
|
||||
&& !(par_.inInset().buffer().areChangesPresent() && par_.isChanged()))
|
||||
par_.inInset().buffer().forceUpdate();
|
||||
} catch(support::ExceptionMessage const &) {}
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user