Segfaults in the error case otherwise.
Cc: mesa-stable
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Gbp-Pq: Name gfxstream-check-device-before-using.diff
// Use kCapsetGfxStreamVulkan for now, Ranchu HWC needs to be modified to pass in
// right capset.
auto device = VirtGpuDevice::getInstance(kCapsetGfxStreamVulkan);
+ if (!device) {
+ mesa_logd("Failed to get VirtGpuDevice\n");
+ return false;
+ }
+
mDescriptor = device->getDeviceHandle();
mStream = createVirtioGpuAddressSpaceStream(kCapsetGfxStreamVulkan);
if (!mStream) {