forked from qt-creator/qt-creator
CMakePM: Fix crash in rstparser
Change-Id: I5a9e456214581800c977e69da01aab1053cc554f Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -212,7 +212,7 @@ void rst::Parser::ParseBlock(
|
||||
}
|
||||
|
||||
// Remove a trailing newline.
|
||||
if (*text.rbegin() == '\n')
|
||||
if (!text.empty() && *text.rbegin() == '\n')
|
||||
text.resize(text.size() - 1);
|
||||
|
||||
bool literal = type == PARAGRAPH && EndsWith(text, "::");
|
||||
|
||||
Reference in New Issue
Block a user