summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ipc.c b/src/ipc.c
index 0ad50bfbc5..7f8f0668e5 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1086,7 +1086,7 @@ RTM_EXPORT(rt_event_send);
* @param option the receive option, either RT_EVENT_FLAG_AND or
* RT_EVENT_FLAG_OR should be set.
* @param timeout the waiting time
- * @param recved the received event
+ * @param recved the received event, if you don't care, RT_NULL can be set.
*
* @return the error code
*/
@@ -1139,7 +1139,8 @@ rt_err_t rt_event_recv(rt_event_t event,
if (status == RT_EOK)
{
/* set received event */
- *recved = (event->set & set);
+ if (recved)
+ *recved = (event->set & set);
/* received event */
if (option & RT_EVENT_FLAG_CLEAR)