kpty: disconnect the stateChanged() signal before calling KPtyDevice::logout()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-06-01 00:42:22 +03:00
parent 84377d0e9f
commit f206d78122

View file

@ -79,9 +79,9 @@ KPtyProcess::~KPtyProcess()
Q_D(KPtyProcess);
if (state() != QProcess::NotRunning && d->addUtmp) {
d->pty->logout();
disconnect(SIGNAL(stateChanged(QProcess::ProcessState)),
this, SLOT(_k_onStateChanged(QProcess::ProcessState)));
d->pty->logout();
}
delete d->pty;
}