The assert already checks this, but even in release builds, doing nothing is probably worse than a memory leak here.