Commit a4989299 authored by Michal Humpula's avatar Michal Humpula
Browse files

gitwidget: disconnect living git processes at destr

When the GitWidget is destroyed while there is still any git QProcess
arround, the exit signal will be delivered to lambda with invalid

Function calls looks something like this:
* ~GitWidget
* ~QWidget
* QWidget::deleteChildren
* ~QProcess
* emit QProcess::finished
* call finished lambda referencing already destroyed GitWidget

See: !430
parent a5d2b7a4
......@@ -251,6 +251,14 @@ GitWidget::~GitWidget()
if (m_cancelHandle) {
// if there are any living processes, disconnect them now before gitwidget get destroyed
for (QObject *child : children()) {
QProcess *p = qobject_cast<QProcess *>(child);
if (p) {
disconnect(p, nullptr, nullptr, nullptr);
void GitWidget::setDotGitPath()
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