summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-04-14 09:25:58 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-04-14 09:26:40 (GMT)
commit4d3d85e1a9de727329e8a8df3b572a778e2da6e2 (patch)
tree017120c346707182537340b9c0e02a63147e5080 /src/network/access
parent0dbd8f1b0a6df20e5502bb35e58490a9f99953a7 (diff)
downloadQt-4d3d85e1a9de727329e8a8df3b572a778e2da6e2.zip
Qt-4d3d85e1a9de727329e8a8df3b572a778e2da6e2.tar.gz
Qt-4d3d85e1a9de727329e8a8df3b572a778e2da6e2.tar.bz2
QFtp: Fix possible crash
Task-number: QTBUG-7359
Diffstat (limited to 'src/network/access')
-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 efeef4e..7f6df0a 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