Merge pull request #280 from cdavis5e/fix-dedicated-alloc-segfault
MVKResource: Check that a VkDeviceMemory is nonnull before using it.
This commit is contained in:
commit
1f7bd607d1
@ -24,7 +24,7 @@
|
||||
|
||||
VkResult MVKResource::bindDeviceMemory(MVKDeviceMemory* mvkMem, VkDeviceSize memOffset) {
|
||||
// Don't do anything with a non-zero offset into a dedicated allocation.
|
||||
if (mvkMem->isDedicatedAllocation() && memOffset) {
|
||||
if (mvkMem && mvkMem->isDedicatedAllocation() && memOffset) {
|
||||
_deviceMemory = nullptr;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user