diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index d17efc09b1..f485e9a7b0 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -478,6 +478,8 @@ public: virtual ~wxInputFTPStream() { + delete m_i_socket; + if ( LastError() == wxStream_NOERROR ) { // wait for "226 transfer completed" @@ -489,8 +491,6 @@ public: { m_ftp->Abort(); } - - delete m_i_socket; } wxFTP *m_ftp;