FIxed svace-warnings 02/78202/2
authorAndrey Klimenko <and.klimenko@samsung.com>
Mon, 4 Jul 2016 12:28:04 +0000 (15:28 +0300)
committerAndrey Klimenko <and.klimenko@samsung.com>
Mon, 4 Jul 2016 12:39:41 +0000 (15:39 +0300)
Change-Id: Iba46f1e6b13be80991bfacf845b667443d750d39
Signed-off-by: Andrey Klimenko <and.klimenko@samsung.com>
src/Conversation/Main/Controller/src/Conversation.cpp

index f4c405b..64ed5de 100644 (file)
@@ -241,8 +241,11 @@ void Conversation::setThreadId(ThreadId id, const std::string &searchWord)
     m_ThreadId = id;
     setMode(m_ThreadId.isValid() ? ConversationMode : NewMessageMode);
 
-    m_pBody->clear();
-    m_pBody->setMmsRecipFlag( getMsgEngine().getStorage().hasEmail(m_ThreadId));
+    if(m_pBody)
+    {
+        m_pBody->clear();
+        m_pBody->setMmsRecipFlag(getMsgEngine().getStorage().hasEmail(m_ThreadId));
+    }
 
     if(m_pRecipPanel)
     {
@@ -573,6 +576,9 @@ void Conversation::convertMsgTypeHandler()
 void Conversation::checkAndSetMsgType()
 {
     // Body:
+    if(!m_pBody)
+        return;
+
     bool isMms = m_pBody->isMms();
 
     // Recipients:
@@ -719,6 +725,9 @@ void Conversation::onChanged(Body &body)
 
 void Conversation::updateMsgInputPanel()
 {
+    if(!m_pBody)
+        return;
+
     if(m_pBody->isMms())
     {
         // Mms: