summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2011-11-05 19:44:43 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2011-11-05 19:44:43 (GMT)
commit6a3e8d211c9629e81ab2ea3f095cfae05b5e2559 (patch)
tree6764db0543b2c4815c0bef0b6c48efa3c6a0249b
parent61c3af0d764b7c7a56d2207ed953c7e5e865738b (diff)
fix assertion when decrypting a text in the editor that does not come from a file
-rw-r--r--editor/kgpgtextedit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/kgpgtextedit.cpp b/editor/kgpgtextedit.cpp
index bb4fd9a..c3d9ffb 100644
--- a/editor/kgpgtextedit.cpp
+++ b/editor/kgpgtextedit.cpp
@@ -253,10 +253,11 @@ void KgpgTextEdit::slotDecryptDone(int result)
{
KGpgDecrypt *decr = qobject_cast<KGpgDecrypt *>(sender());
Q_ASSERT(decr != NULL);
- Q_ASSERT(!m_tempfile.isEmpty());
- KIO::NetAccess::removeTempFile(m_tempfile);
- m_tempfile.clear();
+ if (!m_tempfile.isEmpty()) {
+ KIO::NetAccess::removeTempFile(m_tempfile);
+ m_tempfile.clear();
+ }
if (result == KGpgTransaction::TS_OK) {
#ifdef __GNUC__