api: fix trace_plugin_msg_ids segv in trace dump
[vpp.git] / src / vlibmemory / vlib_api_cli.c
index 5b62e61..f9cda9b 100644 (file)
@@ -683,7 +683,7 @@ vl_msg_print_trace (u8 *msg, void *ctx)
       return 0;
     }
 
-  if (clib_arch_is_little_endian)
+  if (clib_arch_is_little_endian && (m->endian_handler != NULL))
     {
       u32 msg_length = vec_len (msg);
       vec_validate (tmpbuf, msg_length - 1);