Fixed a crash
This commit is contained in:
+1
-1
Submodule github updated: eb310aa0ea...cca898581e
@@ -18,7 +18,11 @@ class ElectronContextMenu implements contextmenu.ContextMenuProvider {
|
||||
|
||||
for(const listener of this._close_listeners) {
|
||||
if(listener) {
|
||||
listener();
|
||||
try {
|
||||
listener();
|
||||
} catch (e) {
|
||||
console.error("Failed to call context menu close listener: %o", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._close_listeners = [];
|
||||
|
||||
@@ -89,14 +89,13 @@ void UDPSocket::finalize() {
|
||||
if(event_write) event_del_noblock(event_write);
|
||||
}
|
||||
|
||||
if(io_base)
|
||||
event_base_loopexit(io_base, nullptr);
|
||||
if(io_base) {
|
||||
event_base_loopexit(io_base, nullptr);
|
||||
}
|
||||
|
||||
if(is_event_thread) {
|
||||
event_base_loopexit(io_base, nullptr);
|
||||
this->_io_thread.detach();
|
||||
} else {
|
||||
event_base_loopexit(io_base, nullptr);
|
||||
if(this->_io_thread.joinable())
|
||||
this->_io_thread.join();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user