From 06cf97f25dfe4cd391ca05128366473585d3ca89 Mon Sep 17 00:00:00 2001 From: Seunghwan Lee Date: Thu, 11 Apr 2013 20:00:55 +0900 Subject: [PATCH] Append NULL check in getText Change-Id: I92bf822907bea23b92e7dfb28620fe0c3e50e080 --- plugin/mms_plugin/MmsPluginStorage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/mms_plugin/MmsPluginStorage.cpp b/plugin/mms_plugin/MmsPluginStorage.cpp index e77320b..f75115d 100755 --- a/plugin/mms_plugin/MmsPluginStorage.cpp +++ b/plugin/mms_plugin/MmsPluginStorage.cpp @@ -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); -- 2.7.4