From 578d90abc22953682ee43ae34777d4815b26f0f6 Mon Sep 17 00:00:00 2001 From: Laurent Soest Date: Mon, 22 Dec 2025 13:20:17 +0100 Subject: [PATCH] check for NULL packet before using the pointer If the queue is empty we need the check here. --- common/usbx_host_classes/src/ux_host_class_asix_thread.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/usbx_host_classes/src/ux_host_class_asix_thread.c b/common/usbx_host_classes/src/ux_host_class_asix_thread.c index a100ecb3..ce2d1185 100644 --- a/common/usbx_host_classes/src/ux_host_class_asix_thread.c +++ b/common/usbx_host_classes/src/ux_host_class_asix_thread.c @@ -440,7 +440,10 @@ USB_NETWORK_DEVICE_TYPE *ux_nx_device; current_packet = asix -> ux_host_class_asix_xmit_queue; /* Get the next packet associated with the first packet. */ - next_packet = current_packet -> nx_packet_queue_next; + if(current_packet != UX_NULL) + next_packet = current_packet -> nx_packet_queue_next; + else + next_packet = UX_NULL; /* Parse all these packets that were scheduled. */ while (current_packet != UX_NULL)