<table><tr><td style="">anthonyfieroni added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6473" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p><a href="https://phabricator.kde.org/source/ktexteditor/browse/master/src/render/katelayoutcache.cpp;ad51cece443bc6bb643fa4ca94293a13d3c2f852$321" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/source/ktexteditor/browse/master/src/render/katelayoutcache.cpp;ad51cece443bc6bb643fa4ca94293a13d3c2f852$321</a><br />
The problem is <tt style="background: #ebebeb; font-size: 13px;">`</tt>realLine >= m_renderer->doc()->lines()<tt style="background: #ebebeb; font-size: 13px;">`</tt> it return a nullptr. First of all <a href="https://phabricator.kde.org/source/ktexteditor/browse/master/src/render/katelayoutcache.cpp;ad51cece443bc6bb643fa4ca94293a13d3c2f852$368" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/source/ktexteditor/browse/master/src/render/katelayoutcache.cpp;ad51cece443bc6bb643fa4ca94293a13d3c2f852$368</a> should be checked against nullptr, even all other places that line(..) is used or better handling of corner case.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6473" rel="noreferrer">https://phabricator.kde.org/D6473</a></div></div><br /><div><strong>To: </strong>jsalatas, KTextEditor<br /><strong>Cc: </strong>anthonyfieroni, dhaumann, kfunk, ltoscano, kwrite-devel, Frameworks<br /></div>