From 0f1aba46fc25a15bcbc53898548b85ff8b5f8455 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sat, 24 May 2008 14:14:01 +0000 Subject: Merge libpciaccess 0.10.2, including kettenis@ OpenBSD port. --- lib/libpciaccess/src/common_iterator.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libpciaccess/src/common_iterator.c') 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 ) { -- cgit v1.2.3