src: crash fixes
* fixed crash when snippet has no code. * fixed crash when saving a filenode with special characters in its name * fixed crash when aborting the parsing
This commit is contained in:
@@ -110,7 +110,7 @@ QtCodeArea::QtCodeArea(
|
||||
m_highlighter = new QtHighlighter(document());
|
||||
|
||||
std::string displayCode = m_code;
|
||||
if (*displayCode.rbegin() == '\n')
|
||||
if (!displayCode.empty() && *displayCode.rbegin() == '\n')
|
||||
{
|
||||
displayCode.pop_back();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user