From 4d3d85e1a9de727329e8a8df3b572a778e2da6e2 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 14 Apr 2010 11:25:58 +0200 Subject: QFtp: Fix possible crash Task-number: QTBUG-7359 --- src/network/access/qftp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v0.12