We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 299d98a commit 138510dCopy full SHA for 138510d
sigc++/weak_raw_ptr.h
@@ -50,7 +50,8 @@ struct weak_raw_ptr : public sigc::notifiable
50
inline weak_raw_ptr(const weak_raw_ptr& src) noexcept
51
: p_(src.p_)
52
{
53
- p_->add_destroy_notify_callback(this, ¬ify_object_invalidated);
+ if (p_)
54
+ p_->add_destroy_notify_callback(this, ¬ify_object_invalidated);
55
}
56
57
inline weak_raw_ptr& operator=(const weak_raw_ptr& src) noexcept
@@ -60,7 +61,9 @@ struct weak_raw_ptr : public sigc::notifiable
60
61
62
63
p_ = src.p_;
64
+
65
66
67
68
return *this;
69
0 commit comments