Skip to content

Commit 19273a3

Browse files
committed
fix: fix ddm crash on treeland crash
The problem is caused by reckless cleanup process. Check those pointers carefully to make reconnection works.
1 parent 6376608 commit 19273a3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/daemon/TreelandConnector.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,14 @@ void TreelandConnector::connect(QString socketPath) {
220220

221221
void TreelandConnector::disconnect() {
222222
if (m_display) {
223-
m_notifier->setEnabled(false);
223+
if (m_notifier)
224+
m_notifier->setEnabled(false);
224225
wl_display_disconnect(m_display);
225-
delete m_notifier;
226+
m_notifier->deleteLater();
227+
m_notifier = nullptr;
228+
m_display = nullptr;
226229
}
230+
m_ddm = nullptr;
227231
}
228232

229233
// Request wrapper

0 commit comments

Comments
 (0)