diff options
author | crupest <crupest@outlook.com> | 2019-03-21 22:44:31 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-03-21 22:44:31 +0800 |
commit | afdac77a66143375b5bebd4ff128b0fba87c5d21 (patch) | |
tree | 8c003a2d32e9411e55544114a3c2c14128909910 /src/ui/content_control.cpp | |
parent | b514247f79469c15959b00ca3276879033f932ff (diff) | |
download | cru-afdac77a66143375b5bebd4ff128b0fba87c5d21.tar.gz cru-afdac77a66143375b5bebd4ff128b0fba87c5d21.tar.bz2 cru-afdac77a66143375b5bebd4ff128b0fba87c5d21.zip |
Change all error handling.
Diffstat (limited to 'src/ui/content_control.cpp')
-rw-r--r-- | src/ui/content_control.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ui/content_control.cpp b/src/ui/content_control.cpp index 960867b2..d5abca1c 100644 --- a/src/ui/content_control.cpp +++ b/src/ui/content_control.cpp @@ -9,9 +9,7 @@ ContentControl::ContentControl() ContentControl::~ContentControl() { delete child_; } void ContentControl::SetChild(Control* child) { - if (dynamic_cast<Window*>(child)) - throw std::invalid_argument("Can't add a window as child."); - + assert(!dynamic_cast<Window*>(child)); // Can't add a window as child. if (child == child_) return; const auto window = GetWindow(); |