Skip to content

Commit 224245f

Browse files
committed
[example 48] check memory allocate returns valid
1 parent 7126e9d commit 224245f

File tree

1 file changed

+1
-0
lines changed
  • examples_tests/48.ArithmeticUnitTest

1 file changed

+1
-0
lines changed

examples_tests/48.ArithmeticUnitTest/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ class ArythmeticUnitTestApp : public NonGraphicalApplicationBase
380380
assert(mreq.memoryTypeBits);
381381
// (Erfan to Cyprian) We usually don't use the return value (SMemoryOffset) of the allocate function but make sure you set it to some variable named bufferMem or something so we know it's there
382382
auto bufferMem = logicalDevice->allocate(mreq, buffers[i].get());
383+
assert(bufferMem.isValid());
383384

384385
IDeviceMemoryAllocation::MappedMemoryRange mem;
385386
mem.memory = buffers[i]->getBoundMemory();

0 commit comments

Comments
 (0)