Skip to content
Snippets Groups Projects
Commit d89c4ecd authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

object-manager: don't try to install if there is no core

This happens when the daemon fails to connect and the
not installed object managers try to get installed, but
the weak ref to the core is already gone
parent 386c75f3
No related branches found
No related tags found
No related merge requests found
......@@ -775,11 +775,13 @@ wp_object_manager_maybe_objects_changed (WpObjectManager * self)
*/
else if (!self->installed) {
g_autoptr (WpCore) core = g_weak_ref_get (&self->core);
WpRegistry *reg = wp_core_get_registry (core);
if (reg->tmp_globals->len == 0 && reg->globals->len != 0) {
wp_trace_object (self, "installed");
g_signal_emit (self, signals[SIGNAL_INSTALLED], 0);
self->installed = TRUE;
if (core) {
WpRegistry *reg = wp_core_get_registry (core);
if (reg->tmp_globals->len == 0 && reg->globals->len != 0) {
wp_trace_object (self, "installed");
g_signal_emit (self, signals[SIGNAL_INSTALLED], 0);
self->installed = TRUE;
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment