From: Elvis Angelaccio Date: Sat, 19 Dec 2020 17:43:44 +0000 (+0100) Subject: Fix crash on Wayland when closing the mainwindow while another dialog is open X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/2f3d8c5c9664f66ff7922ad7fd612f65182c75d0 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. --- diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e7c402b88..4297321fc 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -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 DolphinMainWindow::viewContainers() const