From a4b3dd8a83bf68fb8ab8d7cd96bd1e904f8e247d Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 17 Aug 2004 20:57:35 +0000 Subject: [PATCH] Ouch, don't crash when updating an object (e.g. contact) while the kmail folder holding it isn't open. With thanks to valgrind as always. svn path=/branches/proko2/kdepim/; revision=338706 --- kmailicalifaceimpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kmailicalifaceimpl.cpp b/kmailicalifaceimpl.cpp index b08262dc2..754c6222f 100644 --- a/kmailicalifaceimpl.cpp +++ b/kmailicalifaceimpl.cpp @@ -799,6 +799,8 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource, kdError(5006) << "update(" << resource << ") : Folder has wrong storage format " << storageFormat( f ) << endl; return rc; } + + f->open(); bool quiet = mResourceQuiet; mResourceQuiet = true; @@ -859,6 +861,8 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource, attachmentMimetypes ); } + f->close(); + mResourceQuiet = quiet; return rc; }