Skip to content

Commit

Permalink
Fix crash for remote sessions (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
falbru authored Dec 28, 2024
1 parent fc72cad commit b72531e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
21 changes: 12 additions & 9 deletions src/kakounesession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,18 @@ KakouneSession::KakouneSession(QString session_id, QStringList session_arguments

KakouneSession::~KakouneSession()
{
QProcess kill_session;
kill_session.start("kak", {"-p", m_session_id});
kill_session.waitForStarted();
kill_session.write("kill");
kill_session.closeWriteChannel();
kill_session.waitForFinished();
kill_session.close();

m_process->close();
if (m_process != nullptr)
{
QProcess kill_session;
kill_session.start("kak", {"-p", m_session_id});
kill_session.waitForStarted();
kill_session.write("kill");
kill_session.closeWriteChannel();
kill_session.waitForFinished();
kill_session.close();

m_process->close();
}
}

QString KakouneSession::getSessionId()
Expand Down
1 change: 0 additions & 1 deletion src/kakounewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ QSize KakouneWidget::sizeHint() const

KakouneWidget::~KakouneWidget()
{
delete m_client;
}

QUuid KakouneWidget::getID()
Expand Down

0 comments on commit b72531e

Please sign in to comment.