aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibapi/api_shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibapi/api_shared.c')
-rw-r--r--src/vlibapi/api_shared.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c
index 98da604a456..73ef3ce54d8 100644
--- a/src/vlibapi/api_shared.c
+++ b/src/vlibapi/api_shared.c
@@ -232,7 +232,10 @@ vl_msg_api_trace_write_one (api_main_t *am, u8 *msg, FILE *fp)
u16 id = clib_net_to_host_u16 (*((u16 *) msg));
vl_api_msg_data_t *m = vl_api_get_msg_data (am, id);
- m->endian_handler (tmpmem);
+ if (m && m->endian_handler)
+ {
+ m->endian_handler (tmpmem);
+ }
if (m && m->tojson_handler)
{