diff options
author | Lukas Vacek <lucas.vacek@gmail.com> | 2013-04-02 04:28:13 +0800 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2013-04-03 16:09:22 +0800 |
commit | 3af2b86ec550ae1f37f25504afb95c590e7dd085 (patch) | |
tree | 29ca1f781d627aecc3e23d39f317af7bdc12d1cd /ubuntu-online-accounts/cc-plugins | |
parent | a53e07b1c85f2ea24a0ee3adb43a6e400c1c4ccc (diff) | |
download | gsoc2013-empathy-3af2b86ec550ae1f37f25504afb95c590e7dd085.tar gsoc2013-empathy-3af2b86ec550ae1f37f25504afb95c590e7dd085.tar.gz gsoc2013-empathy-3af2b86ec550ae1f37f25504afb95c590e7dd085.tar.bz2 gsoc2013-empathy-3af2b86ec550ae1f37f25504afb95c590e7dd085.tar.lz gsoc2013-empathy-3af2b86ec550ae1f37f25504afb95c590e7dd085.tar.xz gsoc2013-empathy-3af2b86ec550ae1f37f25504afb95c590e7dd085.tar.zst gsoc2013-empathy-3af2b86ec550ae1f37f25504afb95c590e7dd085.zip |
UOA: Do not segfault when "Done" or "Cancel" button clicked but widget is not ready yet
Diffstat (limited to 'ubuntu-online-accounts/cc-plugins')
-rw-r--r-- | ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c b/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c index 28b4716ab..f90815924 100644 --- a/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c +++ b/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c @@ -147,6 +147,12 @@ response_cb (GtkWidget *widget, gint response, EmpathyAccountsPluginWidget *self) { + if (!self->priv->account_widget) + { + // widget might not be ready yet + g_signal_emit (self, signals[SIG_DONE], 0); + return; + } if (response == GTK_RESPONSE_OK) { empathy_account_widget_apply_and_log_in (self->priv->account_widget); @@ -279,8 +285,8 @@ maybe_add_account_widget (EmpathyAccountsPluginWidget *self) } else { - g_signal_connect_swapped (self->priv->settings, "notify::ready", - G_CALLBACK (add_account_widget), self); + tp_g_signal_connect_object (self->priv->settings, "notify::ready", + G_CALLBACK (add_account_widget), self, G_CONNECT_SWAPPED); } } |