Skip to content

Commit 09b7ac7

Browse files
author
g_j_m
committedJul 28, 2007
Fix for ticket #744 (crash associated with actions).
git-svn-id: http://svn.osgeo.org/qgis/trunk@7110 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a1784bb commit 09b7ac7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/core/qgsrunprocess.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,15 @@ void QgsRunProcess::dialogGone()
126126
// The dialog has gone, so the user is no longer interested in the
127127
// output from the process. Since the process will run happily
128128
// without the QProcess object, this instance and its data can then
129-
// go too.
129+
// go too, but disconnect the signals to prevent further functions in this
130+
// class being called after it has been deleted (Qt seems not to be
131+
// disconnecting them itself)
132+
133+
disconnect(mProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
134+
disconnect(mProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(stdoutAvailable()));
135+
disconnect(mProcess, SIGNAL(readyReadStandardError()), this, SLOT(stderrAvailable()));
136+
disconnect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processExit(int,QProcess::ExitStatus)));
137+
130138
die();
131139
}
132140

0 commit comments

Comments
 (0)