[Bf-blender-cvs] [6a745e54f65] master: Cleanup: remove incorrect assert
Jacques Lucke
noreply at git.blender.org
Tue Sep 28 13:32:44 CEST 2021
Commit: 6a745e54f65d831fe7d4ca101b68bea149c8349a
Author: Jacques Lucke
Date: Tue Sep 28 13:32:22 2021 +0200
Branches: master
https://developer.blender.org/rB6a745e54f65d831fe7d4ca101b68bea149c8349a
Cleanup: remove incorrect assert
The method works perfectly fine when `resource` is empty.
===================================================================
M source/blender/blenlib/BLI_resource_scope.hh
===================================================================
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;
More information about the Bf-blender-cvs
mailing list