diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/dev-network.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 985a629..5dc4538 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -654,7 +654,8 @@ typedef struct USBNetState { static int is_rndis(USBNetState *s) { - return s->dev.config->bConfigurationValue == DEV_RNDIS_CONFIG_VALUE; + return s->dev.config ? + s->dev.config->bConfigurationValue == DEV_RNDIS_CONFIG_VALUE : 0; } static int ndis_query(USBNetState *s, uint32_t oid, |