diff options
| author | Chia-I Wu <olvaffe@gmail.com> | 2014-08-06 12:17:04 +0800 |
|---|---|---|
| committer | Chia-I Wu <olvaffe@gmail.com> | 2014-08-06 12:24:18 +0800 |
| commit | 6117a81e9fa00cec0a83177cd7177dbb4cf2cccd (patch) | |
| tree | 775b5066fac6563fad7ae3b55dd8494e02ba87d5 | |
| parent | 4430a356f44fb226c139bee5be591e2eb64b4f13 (diff) | |
| download | usermoji-6117a81e9fa00cec0a83177cd7177dbb4cf2cccd.tar.xz | |
loader: short cut when init with maxGpus equal to 0
| -rw-r--r-- | loader/loader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/loader/loader.c b/loader/loader.c index b5699656..563baae5 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -364,7 +364,7 @@ LOADER_EXPORT XGL_RESULT XGLAPI xglInitAndEnumerateGpus(const XGL_APPLICATION_IN } 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; |
