fix a crash that deleting a widget in its event handler

This commit is contained in:
Jinhao
2016-09-02 07:49:55 +08:00
parent f400c14f9b
commit 6eece91fce

View File

@@ -1535,6 +1535,11 @@ namespace detail
wd->annex.caret_ptr = nullptr;
}
using effect_renderer = detail::edge_nimbus_renderer<basic_window>;
//remove the window from edge nimbus effect when it is destroying
effect_renderer::instance().erase(wd);
arg_destroy arg;
arg.window_handle = reinterpret_cast<window>(wd);
brock.emit(event_code::destroy, wd, arg, true, brock.get_thread_context());