diff options
Diffstat (limited to 'loader/loader.c')
| -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; |
