Don suggest this way -        KMMessage* msg = mMsgView->msg(); -        if ( !msg ) +        KMMessage *msg; +        int aIdx; +        if((aIdx = mHeaders->currentItemIndex()) <= -1) +           return; +        if(!(msg = mHeaders->getMsg(aIdx)))
Don suggest this way
-        KMMessage* msg = mMsgView->msg();
-        if ( !msg )
+        KMMessage *msg;
+        int aIdx;
+        if((aIdx = mHeaders->currentItemIndex()) <= -1)
+           return;
+        if(!(msg = mHeaders->getMsg(aIdx)))

svn path=/trunk/kdenetwork/kmail/; revision=92685

lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi