Append NULL check in getText
authorSeunghwan Lee <sh.cat.lee@samsung.com>
Thu, 11 Apr 2013 11:00:55 +0000 (20:00 +0900)
committerSeunghwan Lee <sh.cat.lee@samsung.com>
Thu, 11 Apr 2013 11:00:55 +0000 (20:00 +0900)
Change-Id: I92bf822907bea23b92e7dfb28620fe0c3e50e080

plugin/mms_plugin/MmsPluginStorage.cpp

index e77320b..f75115d 100755 (executable)
@@ -1244,6 +1244,9 @@ msg_error_t MmsPluginStorage::getMsgText(MMS_MESSAGE_DATA_S *pMmsMsg, char *pMsg
        int textLen = 0;
        bool bText = false;
 
+       if (pMmsMsg == NULL)
+               return MSG_ERR_NULL_POINTER;
+
        // Get the text data from the 1st slide.
        for (int i = 0; i< pMmsMsg->pageCnt; ++i) {
                pPage = _MsgMmsGetPage(pMmsMsg, i);