From cc93733c4256b887272cf1e46a8d7c0b30a0092a Mon Sep 17 00:00:00 2001 From: anteater Date: Sun, 11 Apr 2021 02:37:13 +0000 Subject: [PATCH] ofono: don't clear self->modem after constructing CallsOfonoOrigin self->modem is used in calls_ofono_origin_matches; in that context, warn if it is NULL --- plugins/ofono/calls-ofono-origin.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/ofono/calls-ofono-origin.c b/plugins/ofono/calls-ofono-origin.c index 605e250..b995ec5 100644 --- a/plugins/ofono/calls-ofono-origin.c +++ b/plugins/ofono/calls-ofono-origin.c @@ -117,9 +117,7 @@ calls_ofono_origin_matches (CallsOfonoOrigin *self, { g_return_val_if_fail (CALLS_IS_OFONO_ORIGIN (self), FALSE); g_return_val_if_fail (path, FALSE); - - if (!self->modem) - return FALSE; + g_return_val_if_fail (self->modem, FALSE); return g_strcmp0 (g_dbus_proxy_get_object_path (G_DBUS_PROXY (self->modem)), path) == 0; } @@ -504,8 +502,6 @@ constructed (GObject *object) (GAsyncReadyCallback)voice_new_cb, self); - g_clear_object (&self->modem); - G_OBJECT_CLASS (calls_ofono_origin_parent_class)->constructed (object); }