Output debug message when creating bad length

Coverity is right to say that we should check the return value.
This commit is contained in:
Jean-Marc Lasgouttes 2017-03-14 15:20:09 +01:00
parent c6213b1b20
commit 5d29527916

View File

@ -21,6 +21,7 @@
#include "frontends/FontMetrics.h"
#include "support/debug.h"
#include "support/docstream.h"
#include "support/lstrings.h"
#include "support/lyxlib.h"
@ -362,9 +363,8 @@ GlueLength::GlueLength(Length const & len, Length const & plus,
GlueLength::GlueLength(string const & data)
{
// false positive from coverity
// coverity[CHECKED_RETURN]
isValidGlueLength(data, this);
if (!isValidGlueLength(data, this))
LYXERR0("Invalid glue length " + data);
}