[empathy] early return if accounts_dialog_model_get_selected_settings() returns NULL
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] early return if accounts_dialog_model_get_selected_settings() returns NULL
- Date: Mon, 12 Mar 2012 12:00:09 +0000 (UTC)
commit afcd81098a2134d1421844ebf37a9ba90e1193bf
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Mar 12 12:56:32 2012 +0100
early return if accounts_dialog_model_get_selected_settings() returns NULL
It can happen, typically if no account is currently selected.
https://bugzilla.gnome.org/show_bug.cgi?id=671790
src/empathy-accounts-dialog.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index a3cb149..189f22b 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -568,6 +568,8 @@ account_dialog_create_edit_params_dialog (EmpathyAccountsDialog *dialog)
GtkWidget *subdialog, *content, *content_area, *align;
settings = accounts_dialog_model_get_selected_settings (dialog);
+ if (settings == NULL)
+ return;
subdialog = gtk_dialog_new_with_buttons (_("Edit Connection Parameters"),
GTK_WINDOW (dialog),
@@ -701,6 +703,8 @@ account_dialow_show_edit_params_dialog (EmpathyAccountsDialog *dialog,
TpStorageRestrictionFlags storage_restrictions;
settings = accounts_dialog_model_get_selected_settings (dialog);
+ if (settings == NULL)
+ return;
account = empathy_account_settings_get_account (settings);
g_return_if_fail (account != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]