diff options
Diffstat (limited to 'src/common_iterator.c')
-rw-r--r-- | src/common_iterator.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common_iterator.c b/src/common_iterator.c index 73d2755..83cade3 100644 --- a/src/common_iterator.c +++ b/src/common_iterator.c @@ -158,6 +158,9 @@ pci_device_next( struct pci_device_iterator * iter ) { struct pci_device_private * d = NULL; + if (!iter) + return NULL; + switch( iter->mode ) { case match_any: if ( iter->next_index < pci_sys->num_devices ) { |