mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Try another way of convincing coverity that everything is fine
We have a false positive here, but annotating with coverity[] comments is not very convenient. Let's try to use good old assertions instead.
This commit is contained in:
parent
d683cc2147
commit
aa62b1ad49
@ -36,6 +36,7 @@
|
||||
|
||||
#include "frontends/alert.h"
|
||||
|
||||
#include "support/lassert.h"
|
||||
#include "support/convert.h"
|
||||
#include "support/debug.h"
|
||||
#include "support/docstream.h"
|
||||
@ -67,11 +68,12 @@ InsetBibitem::InsetBibitem(Buffer * buf, InsetCommandParams const & p)
|
||||
|
||||
InsetBibitem::~InsetBibitem()
|
||||
{
|
||||
if (isBufferLoaded())
|
||||
if (isBufferLoaded()) {
|
||||
/* Coverity believes that this may throw an exception, but
|
||||
* actually this code path is not taken when buffer_ == 0 */
|
||||
// coverity[fun_call_w_exception]
|
||||
LATTEST(buffer_);
|
||||
buffer().invalidateBibinfoCache();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user