m-std-event-source: don't push events during the core dispose sequence

This commit is contained in:
George Kiagiadakis
2023-06-23 14:12:27 +03:00
parent a982b7917c
commit 417b0dff4c

View File

@@ -250,7 +250,12 @@ wp_standard_event_source_push_event (WpStandardEventSource *self,
{
g_autoptr (WpCore) core = wp_object_get_core (WP_OBJECT (self));
g_return_if_fail (core);
/* this can happen during the core dispose sequence; the weak ref to the
core is invalidated before the registered objects are destroyed */
if (!core)
return;
g_autoptr (WpEventDispatcher) dispatcher =
wp_event_dispatcher_get_instance (core);
g_return_if_fail (dispatcher);