summaryrefslogtreecommitdiff
path: root/lib/libpciaccess/src/common_iterator.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-05-24 14:14:01 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-05-24 14:14:01 +0000
commit0f1aba46fc25a15bcbc53898548b85ff8b5f8455 (patch)
tree05b115425a1a111e8076e7bcd284d1284d1be2a6 /lib/libpciaccess/src/common_iterator.c
parentf091cb11ce9394593383465493467b328134bc42 (diff)
Merge libpciaccess 0.10.2, including kettenis@ OpenBSD port.
Diffstat (limited to 'lib/libpciaccess/src/common_iterator.c')
-rw-r--r--lib/libpciaccess/src/common_iterator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libpciaccess/src/common_iterator.c b/lib/libpciaccess/src/common_iterator.c
index 73d275574..83cade326 100644
--- a/lib/libpciaccess/src/common_iterator.c
+++ b/lib/libpciaccess/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 ) {