summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-07-30 14:06:11 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-07-30 14:07:10 (GMT)
commit220d3f3bc9381c7582d7ebcd5f307f0d79d622d8 (patch)
treec4e269e57fa9f40f0af03be8a7fef79ea4f97eb9
parent662675e0f407939f27570c1a8d4f407187208e29 (diff)
downloadlibkolab-libkolab-0.2.tar.gz
Don't crash if the organizer is not available.libkolab-0.2
(cherry picked from commit 1853a5fce7be51056d2c4b2b3dde6a887f589cb1)
-rw-r--r--mime/mimeutils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/mime/mimeutils.cpp b/mime/mimeutils.cpp
index 355a3eb..ac26037 100644
--- a/mime/mimeutils.cpp
+++ b/mime/mimeutils.cpp
@@ -100,7 +100,9 @@ QString fromCid(const QString &cid)
KMime::Message::Ptr createMessage(const KCalCore::Incidence::Ptr &incidencePtr, const QString &mimetype, const QString &xKolabType, const QByteArray &xml, bool v3, const QString &productId)
{
KMime::Message::Ptr message = createMessage( xKolabType, v3, productId );
- message->from()->addAddress( incidencePtr->organizer()->email().toUtf8(), incidencePtr->organizer()->name() );
+ if ( incidencePtr->organizer() ) {
+ message->from()->addAddress( incidencePtr->organizer()->email().toUtf8(), incidencePtr->organizer()->name() );
+ }
message->subject()->fromUnicodeString( incidencePtr->uid(), "utf-8" );
KMime::Content *content = createMainPart( mimetype, xml );