commit | 74916ed7913974ee4a9d0ce4a8f72ff86c572e9e | [log] [tgz] |
---|---|---|
author | Chia-I Wu <olvaffe@gmail.com> | Wed Aug 06 12:17:04 2014 +0800 |
committer | Chia-I Wu <olvaffe@gmail.com> | Wed Aug 06 12:24:18 2014 +0800 |
tree | 053bb9fc42c849194d13d32ea4f685a47b089bd5 | |
parent | c7bff53cd06603c5a2f20b141d4f267e505e0951 [diff] [blame] |
loader: short cut when init with maxGpus equal to 0
diff --git a/loader/loader.c b/loader/loader.c index b569965..563baae 100644 --- a/loader/loader.c +++ b/loader/loader.c
@@ -364,7 +364,7 @@ } res = icd->InitAndEnumerateGpus(pAppInfo, pAllocCb, max, &n, gpus); - if (res == XGL_SUCCESS) { + if (res == XGL_SUCCESS && n) { memcpy(pGpus + count, gpus, sizeof(*pGpus) * n); count += n;