diff --git a/src/libs/compat/freebsd11_network/bus.cpp b/src/libs/compat/freebsd11_network/bus.cpp index 34fbb9a87e..41bc134210 100644 --- a/src/libs/compat/freebsd11_network/bus.cpp +++ b/src/libs/compat/freebsd11_network/bus.cpp @@ -400,6 +400,9 @@ int bus_teardown_intr(device_t dev, struct resource *res, void *arg) { struct internal_intr *intr = (struct internal_intr *)arg; + if (intr == NULL) + return -1; + struct root_device_softc *root = (struct root_device_softc *)dev->root->softc; if ((root->is_msi || root->is_msix) && gPCIx86 != NULL) {