Blob Blame History Raw
From 53de8e5aedde8fd133d07aa7671088563c472b9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian@gmail.com>
Date: Thu, 22 Nov 2012 22:03:24 +0200
Subject: [PATCH 08/22] Fix a crash when cancelling the OFX update dialog while
 waiting for operations that occur until the TransferJob is created. These
 operations can be things like waiting for KWallet, waiting for
 libofx_request_statement, etc.

BUG: 281728
(cherry picked from commit 3b55cc66447b5013ae9f4f06b496e4c55384989d)
---
 kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp b/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp
index a256773..5dfa65a 100644
--- a/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp
+++ b/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp
@@ -219,7 +219,8 @@ void KOfxDirectConnectDlg::slotOfxFinished(KJob* /* e */)
 
 void KOfxDirectConnectDlg::reject(void)
 {
-  m_job->kill();
+  if (m_job)
+    m_job->kill();
   if (m_tmpfile) {
     m_tmpfile->close();
     delete m_tmpfile;
-- 
1.8.1.4