summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-04-14 11:25:58 +0200
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-04-14 11:26:40 +0200
commit4d3d85e1a9de727329e8a8df3b572a778e2da6e2 (patch)
tree017120c346707182537340b9c0e02a63147e5080 /src/network
parent0dbd8f1b0a6df20e5502bb35e58490a9f99953a7 (diff)
QFtp: Fix possible crash
Task-number: QTBUG-7359
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qftp.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index efeef4e18c..7f6df0afb1 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -2309,6 +2309,12 @@ void QFtpPrivate::_q_piFinished(const QString&)
void QFtpPrivate::_q_piError(int errorCode, const QString &text)
{
Q_Q(QFtp);
+
+ if (pending.isEmpty()) {
+ qWarning() << "QFtpPrivate::_q_piError was called without pending command!";
+ return;
+ }
+
QFtpCommand *c = pending.first();
// non-fatal errors