diff --git a/wintun.c b/wintun.c index 26d2c1e..8db1924 100644 --- a/wintun.c +++ b/wintun.c @@ -1069,6 +1069,8 @@ TunDispatchPnP(DEVICE_OBJECT *DeviceObject, IRP *Irp) { #pragma warning(suppress : 28175) TUN_CTX *ctx = DeviceObject->Reserved; + if (!ctx) + return NdisDispatchPnP(DeviceObject, Irp); switch (stack->MinorFunction) {