Commit c2ecee51 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

TextEditor: Avoid removing text marks that were not added to hash

TextMarks with empty file names are not added, no reason to remove them.

Change-Id: I8647deaa1136294d2f7c3c63337d967afea675c2
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent a54cba42
......@@ -88,7 +88,8 @@ TextMark::TextMark(const QString &fileName, int lineNumber, Id category, double
TextMark::~TextMark()
{
TextMarkRegistry::remove(this);
if (!m_fileName.isEmpty())
TextMarkRegistry::remove(this);
if (m_baseTextDocument)
m_baseTextDocument->removeMark(this);
m_baseTextDocument = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment