Commit 2f3d8c5c authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Fix crash on Wayland when closing the mainwindow while another dialog is open

For some reason on Wayland `QClipboad::dataChanged` can be emitted after
the main window gets deleted. In particular this happens when closing the
main window while another dialog is open.

Since we are closing the window, we can just disconnect this signal and
prevent this crash from ever happening.
parent ec3c196e
Pipeline #63625 passed with stage
in 5 minutes and 27 seconds
......@@ -204,6 +204,8 @@ DolphinMainWindow::DolphinMainWindow() :
DolphinMainWindow::~DolphinMainWindow()
{
// This fixes a crash on Wayland when closing the mainwindow while another dialog is open.
disconnect(QGuiApplication::clipboard(), &QClipboard::dataChanged, this, &DolphinMainWindow::updatePasteAction);
}
QVector<DolphinViewContainer*> DolphinMainWindow::viewContainers() const
......
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