Skip to content

Commit d565faa

Browse files
committed
Make non-initialised MIP poll work
1 parent 786e118 commit d565faa

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mip/mip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ static void mip_rx(struct mip_if *ifp, void *buf, size_t len) {
670670
}
671671

672672
static void mip_poll(struct mip_if *ifp, uint64_t uptime_ms) {
673+
if (ifp == NULL || ifp->driver == NULL) return;
673674
ifp->curtime = uptime_ms;
674675

675676
if (ifp->ip == 0 && uptime_ms > ifp->timer) {

mongoose.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6764,6 +6764,7 @@ static void mip_rx(struct mip_if *ifp, void *buf, size_t len) {
67646764
}
67656765

67666766
static void mip_poll(struct mip_if *ifp, uint64_t uptime_ms) {
6767+
if (ifp == NULL || ifp->driver == NULL) return;
67676768
ifp->curtime = uptime_ms;
67686769

67696770
if (ifp->ip == 0 && uptime_ms > ifp->timer) {

0 commit comments

Comments
 (0)