aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/SingleChildControl.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-03-10 19:07:28 +0800
committercrupest <crupest@outlook.com>2022-03-10 19:07:28 +0800
commita9558215aef3b0ad67dc73788305e1b46bc872b5 (patch)
treef35839c8f47c372e2a9bb248c113bc4ea334c827 /include/cru/ui/controls/SingleChildControl.h
parentd790505c3c0c829b6831ae8db2fd4e75d018e2c1 (diff)
downloadcru-a9558215aef3b0ad67dc73788305e1b46bc872b5.tar.gz
cru-a9558215aef3b0ad67dc73788305e1b46bc872b5.tar.bz2
cru-a9558215aef3b0ad67dc73788305e1b46bc872b5.zip
...
Diffstat (limited to 'include/cru/ui/controls/SingleChildControl.h')
-rw-r--r--include/cru/ui/controls/SingleChildControl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/cru/ui/controls/SingleChildControl.h b/include/cru/ui/controls/SingleChildControl.h
index e733c825..b2e58c5f 100644
--- a/include/cru/ui/controls/SingleChildControl.h
+++ b/include/cru/ui/controls/SingleChildControl.h
@@ -13,7 +13,7 @@ class SingleChildControl : public Control {
CRU_DELETE_COPY(SingleChildControl)
CRU_DELETE_MOVE(SingleChildControl)
- ~SingleChildControl() override {}
+ ~SingleChildControl() override { SetChild(nullptr); }
Control* GetChild() const { return child_; }
void SetChild(Control* child) {