diff options
author | Felix Kaser <f.kaser@gmx.net> | 2009-12-01 20:53:24 +0800 |
---|---|---|
committer | Felix Kaser <f.kaser@gmx.net> | 2009-12-02 00:18:56 +0800 |
commit | 19d28abca284a7a85a98f8bdd01aeb0ff54860e7 (patch) | |
tree | ca16a9eb93b5c52b8f01903bcdcf6330eb5191ca | |
parent | 02c70cf6746cd909a873f54dd320772160f9ec13 (diff) | |
download | gsoc2013-empathy-19d28abca284a7a85a98f8bdd01aeb0ff54860e7.tar gsoc2013-empathy-19d28abca284a7a85a98f8bdd01aeb0ff54860e7.tar.gz gsoc2013-empathy-19d28abca284a7a85a98f8bdd01aeb0ff54860e7.tar.bz2 gsoc2013-empathy-19d28abca284a7a85a98f8bdd01aeb0ff54860e7.tar.lz gsoc2013-empathy-19d28abca284a7a85a98f8bdd01aeb0ff54860e7.tar.xz gsoc2013-empathy-19d28abca284a7a85a98f8bdd01aeb0ff54860e7.tar.zst gsoc2013-empathy-19d28abca284a7a85a98f8bdd01aeb0ff54860e7.zip |
fixed problem with destroyed widget in async call
with all the async calls the widget needed in one of the callbacks was destroyed before the callback was called.
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 80523f0ce..30bb55263 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -685,6 +685,7 @@ account_widget_account_enabled_cb (GObject *source_object, } } + g_object_unref (widget); g_free (message); g_free (status); } @@ -716,6 +717,7 @@ account_widget_applied_cb (GObject *source_object, if (priv->creating_account) { /* By default, when an account is created, we enable it. */ + g_object_ref (widget); tp_account_set_enabled_async (account, TRUE, account_widget_account_enabled_cb, widget); priv->account_created = TRUE; @@ -745,6 +747,7 @@ account_widget_applied_cb (GObject *source_object, } account_widget_set_control_buttons_sensitivity (widget, FALSE); + g_object_unref (widget); } static void @@ -753,6 +756,7 @@ account_widget_apply_clicked_cb (GtkWidget *button, { EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + g_object_ref (self); empathy_account_settings_apply_async (priv->settings, account_widget_applied_cb, self); } @@ -1194,6 +1198,7 @@ account_widget_switch_flipped_cb (NbtkGtkLightSwitch *sw, account = empathy_account_settings_get_account (priv->settings); /* Enable the account according to the value of the "Enabled" checkbox */ + g_object_ref (user_data); tp_account_set_enabled_async (account, state, account_widget_account_enabled_cb, user_data); } |