intel: Check for NULL pData on various calls and make sure dataSize is written
diff --git a/icd/intel/query.c b/icd/intel/query.c
index 63fa891..1f00f98 100644
--- a/icd/intel/query.c
+++ b/icd/intel/query.c
@@ -47,12 +47,14 @@
{
XGL_MEMORY_REQUIREMENTS *mem_req = data;
+ *size = sizeof(XGL_MEMORY_REQUIREMENTS);
+ if (data == NULL)
+ return ret;
mem_req->size = query->slot_stride * query->slot_count;
mem_req->alignment = 64;
mem_req->heapCount = 1;
mem_req->heaps[0] = 0;
- *size = sizeof(*mem_req);
}
break;
default: