File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ class observable_unique_ptr {
194194 * using make_observable_unique() instead of this constructor.
195195 */
196196 explicit observable_unique_ptr (T* value) :
197- observable_unique_ptr(allocate_block_(), value) {}
197+ observable_unique_ptr(value != nullptr ? allocate_block_() : nullptr , value) {}
198198
199199 // / Explicit ownership capture of a raw pointer, with customer deleter.
200200 /* * \param value The raw pointer to take ownership of
@@ -204,7 +204,7 @@ class observable_unique_ptr {
204204 * using make_observable_unique() instead of this constructor.
205205 */
206206 explicit observable_unique_ptr (T* value, Deleter del) :
207- observable_unique_ptr(allocate_block_(), value, std::move(del)) {}
207+ observable_unique_ptr(value != nullptr ? allocate_block_() : nullptr , value, std::move(del)) {}
208208
209209 // / Transfer ownership by implicit casting
210210 /* * \param value The pointer to take ownership from
You can’t perform that action at this time.
0 commit comments