object-manager: do not accept globals without a WpProxy subclass

This commit is contained in:
George Kiagiadakis 2020-06-01 17:48:27 +03:00
parent 6aba49f9e3
commit a7d657a196

View file

@ -676,6 +676,11 @@ wp_object_manager_add_global (WpObjectManager * self, WpGlobal * global)
{
WpProxyFeatures features = 0;
/* do not allow proxies that don't have a defined subclass;
bind will fail because proxy_class->pw_iface_type is NULL */
if (global->type == WP_TYPE_PROXY)
return;
if (wp_object_manager_is_interested_in_global (self, global, &features)) {
g_autoptr (WpCore) core = g_weak_ref_get (&self->core);