diff --git a/adl.c b/adl.c index cd977f25..aa22002b 100644 --- a/adl.c +++ b/adl.c @@ -339,6 +339,9 @@ void init_adl(int nDevs) } } + if (devices > nDevs) + devices = nDevs; + for (gpu = 0; gpu < devices; gpu++) { struct gpu_adl *ga; int iAdapterIndex;