DocBook: fix an assertion/crash.

This commit is contained in:
Thibaut Cuvelier 2020-10-16 17:02:06 +02:00
parent e3bf51a4c3
commit 0ba9b7c0c8

View File

@ -30,6 +30,7 @@
#include "insets/InsetNote.h" #include "insets/InsetNote.h"
#include "support/lassert.h" #include "support/lassert.h"
#include "support/textutils.h"
#include <stack> #include <stack>
#include <iostream> #include <iostream>
@ -896,7 +897,7 @@ void outputDocBookInfo(
// even though they must be properly output if there is some abstract. // even though they must be properly output if there is some abstract.
abstract = os2.str(); abstract = os2.str();
docstring cleaned = abstract; docstring cleaned = abstract;
cleaned.erase(std::remove_if(cleaned.begin(), cleaned.end(), ::isspace), cleaned.end()); cleaned.erase(std::remove_if(cleaned.begin(), cleaned.end(), lyx::isSpace), cleaned.end());
// Nothing? Then there is no abstract! // Nothing? Then there is no abstract!
if (cleaned.empty()) if (cleaned.empty())