Skip to content

Commit 700bb79

Browse files
committed
Refs #21293: Apply last comment
Signed-off-by: Mario Dominguez <[email protected]>
1 parent f997352 commit 700bb79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cpp/utils/RefCountedPointer.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,17 @@ class RefCountedPointer
5959
/**
6060
* @brief Explicit constructor.
6161
* @param ptr Pointer to manage.
62+
*
63+
* @pre nullptr != ptr. We must ensure that the pointer we
64+
* are manaing is valid.
6265
*/
6366
explicit RefCountedPointer(
6467
T* ptr)
6568
: ptr_(ptr)
6669
, is_active_(true)
6770
, instances_(0)
6871
{
72+
assert(nullptr != ptr);
6973
}
7074

7175
~RefCountedPointer() = default;

0 commit comments

Comments
 (0)