Skip to content

Commit 3f618d8

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 3f618d8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/daemon/TreelandConnector.cpp

Lines changed: 5 additions & 1 deletion
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);
225226
delete m_notifier;
227+
m_display = nullptr;
226228
}
229+
if (m_ddm)
230+
m_ddm = nullptr;
227231
}
228232

229233
// Request wrapper

0 commit comments

Comments
 (0)