Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-09-28 14:32:22 +0300
committerJacques Lucke <jacques@blender.org>2021-09-28 14:32:22 +0300
commit6a745e54f65d831fe7d4ca101b68bea149c8349a (patch)
treea591f7e97984361c9ad5963f435c2636965679d3
parent5d160dec3b8d469994ea9c6c22bd8100789d8c1e (diff)
Cleanup: remove incorrect assert
The method works perfectly fine when `resource` is empty.
-rw-r--r--source/blender/blenlib/BLI_resource_scope.hh1
1 files changed, 0 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_resource_scope.hh b/source/blender/blenlib/BLI_resource_scope.hh
index edffb148477..761e1ef834c 100644
--- a/source/blender/blenlib/BLI_resource_scope.hh
+++ b/source/blender/blenlib/BLI_resource_scope.hh
@@ -73,7 +73,6 @@ class ResourceScope : NonCopyable, NonMovable {
*/
template<typename T> T *add(std::unique_ptr<T> resource)
{
- BLI_assert(resource.get() != nullptr);
T *ptr = resource.release();
if (ptr == nullptr) {
return nullptr;