Commit de1b612c authored by Bastien Nocera's avatar Bastien Nocera
Browse files

region: Fix crash when changing the language

1. Load region panel
2. Change language
3. Go back to overview
4. Load region panel
5. Change language
6. Crash

As the ActUser and ActUserManager object aren't reference counted,
we need to disconnect the signals ourselves when exiting the panel
otherwise we'll receive the signals from the old signal connection,
which will use the old panel object.
parent de3f5459
......@@ -122,8 +122,16 @@ cc_region_panel_finalize (GObject *object)
CcRegionPanel *self = CC_REGION_PANEL (object);
CcRegionPanelPrivate *priv = self->priv;
priv->user_manager = NULL;
priv->user = NULL;
if (priv->user_manager) {
g_signal_handlers_disconnect_by_data (priv->user_manager, self);
priv->user_manager = NULL;
}
if (priv->user) {
g_signal_handlers_disconnect_by_data (priv->user, self);
priv->user = NULL;
}
g_clear_object (&priv->permission);
g_clear_object (&priv->localed);
g_clear_object (&priv->builder);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment