diff options
author | Sam Nelson <sam.nelson@ti.com> | 2019-10-07 21:07:47 -0400 |
---|---|---|
committer | Sam Nelson <sam.nelson@ti.com> | 2019-10-08 15:51:05 -0400 |
commit | 07bc6c9048bee0fa53791ad5df101213f0db4c95 (patch) | |
tree | 6af828aad36616e2ace5ffebd3f79b1f89989372 | |
parent | 6130993bdc3b4e66d298fcd84afb348d76460aa0 (diff) | |
download | ipc-07bc6c9048bee0fa53791ad5df101213f0db4c95.tar.gz |
RPMessage: Add additional check to handle no Assert case
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
-rw-r--r-- | packages/ti/ipc/rpmsg/RPMessage.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/ti/ipc/rpmsg/RPMessage.c b/packages/ti/ipc/rpmsg/RPMessage.c index ec95c7d..1ab7402 100644 --- a/packages/ti/ipc/rpmsg/RPMessage.c +++ b/packages/ti/ipc/rpmsg/RPMessage.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 Texas Instruments Incorporated - http://www.ti.com + * Copyright (c) 2011-2019 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -519,8 +519,13 @@ Int RPMessage_recv(RPMessage_Handle handle, Ptr data, UInt16 *len, status = RPMessage_E_UNBLOCKED; } else { - payload = (Queue_elem *)List_get(obj->queue); - Assert_isTrue((payload), NULL); + payload = (Queue_elem *)List_get(obj->queue); + Assert_isTrue((payload), NULL); + /* Additional check to handle case when Assert is disabled */ + if(payload == NULL) { + Log_print0(Diags_STATUS, FXNN": Payload NULL!"); + status = RPMessage_E_FAIL; + } } if (status == RPMessage_S_SUCCESS) { |