summaryrefslogtreecommitdiffstats
path: root/pcitool/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcitool/cli.c')
-rw-r--r--pcitool/cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcitool/cli.c b/pcitool/cli.c
index b267c5b..7e641da 100644
--- a/pcitool/cli.c
+++ b/pcitool/cli.c
@@ -980,7 +980,7 @@ void Info(pcilib_t *handle, const pcilib_model_description_t *model_info, const
if (info) {
printf(" %s\n", entry->d_name);
for (j = 0; info[j].name; j++) {
- pcilib_version_t version = info[j].api->version;
+ pcilib_version_t version = info[j].api?info[j].api->version:0;
printf(" %-12s %u.%u.%u - %s\n", info[j].name,
PCILIB_VERSION_GET_MAJOR(version),
PCILIB_VERSION_GET_MINOR(version),