fix a crash
a crash caused by a splitbar would be created by place when the window is destorying; add some checks whether the parent is destorying in create widget functions
This commit is contained in:
@@ -213,6 +213,9 @@ namespace detail
|
||||
|
||||
if (impl_->wd_register.available(owner))
|
||||
{
|
||||
if (owner->flags.destroying)
|
||||
throw std::logic_error("the specified owner is destory");
|
||||
|
||||
native = (owner->other.category == category::frame_tag::value ?
|
||||
owner->other.attribute.frame->container : owner->root_widget->root);
|
||||
r.x += owner->pos_root.x;
|
||||
@@ -303,6 +306,9 @@ namespace detail
|
||||
if (impl_->wd_register.available(parent) == false)
|
||||
throw std::invalid_argument("invalid parent/owner handle");
|
||||
|
||||
if (parent->flags.destroying)
|
||||
throw std::logic_error("the specified parent is destory");
|
||||
|
||||
auto wdg_notifier = widget_notifier_interface::get_notifier(wdg);
|
||||
|
||||
core_window_t * wd;
|
||||
|
||||
Reference in New Issue
Block a user