RSA sync with private
[platform/core/messaging/msg-service.git] / mapi / msg_control.cpp
index cf24235..f9e7d71 100755 (executable)
 ==================================================================================================*/
 EXPORT_API int msg_open_msg_handle(msg_handle_t *handle)
 {
-       MsgHandle* pHandle = new MsgHandle();
-
        if (handle == NULL)
        {
                MSG_FATAL("Input Paramter is NULL");
                return -EINVAL;
        }
+       MsgHandle* pHandle = new MsgHandle();
 
        // Create MsgHandle
        *handle = (msg_handle_t)pHandle;