<table><tr><td style="">subdiff updated this revision to Diff 10649.<br />subdiff 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/D4301" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>One more try with guarding against dangling pointers. Just trying out stuff here. So in case this is utter bullshit please tell me if and why it doesn't work.</p>
<p>My thinking was the following:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Guard code execution in <tt style="background: #ebebeb; font-size: 13px;">StatusNotifierItemSource::activate</tt> against deleted <tt style="background: #ebebeb; font-size: 13px;">m_statusNotifierItemInterface</tt> by comparing it to the old pointer value</li>
<li class="remarkup-list-item">In case not deleted emit a callback signal, which is received in <tt style="background: #ebebeb; font-size: 13px;">StatusNotifierItemJob::activateCallback</tt>, if job object hasn't been deleted before</li>
<li class="remarkup-list-item">set the result, which is received by <tt style="background: #ebebeb; font-size: 13px;">StatusNotifierItem.qml</tt> as long as it exists. I mean since it connects to the finished signal of the job, there shouldn't be a problem, if it got deleted earlier.</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D4301?vs=10605&id=10649" rel="noreferrer">https://phabricator.kde.org/D4301?vs=10605&id=10649</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4301" rel="noreferrer">https://phabricator.kde.org/D4301</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml<br />
dataengines/statusnotifieritem/statusnotifieritemjob.cpp<br />
dataengines/statusnotifieritem/statusnotifieritemjob.h<br />
dataengines/statusnotifieritem/statusnotifieritemsource.cpp<br />
dataengines/statusnotifieritem/statusnotifieritemsource.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>subdiff, Plasma, davidedmundson<br /><strong>Cc: </strong>broulik, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>