[gnome-contacts/new-design] Avoid warnings on row deletion
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/new-design] Avoid warnings on row deletion
- Date: Thu, 15 Dec 2011 09:39:21 +0000 (UTC)
commit 87f00927360c3d85d59125bee612f20fb92be623
Author: Alexander Larsson <alexl redhat com>
Date: Wed Dec 14 01:09:36 2011 +0100
Avoid warnings on row deletion
src/contacts-contact-pane.vala | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 03fdfa2..49eb507 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -722,8 +722,11 @@ public abstract class Contacts.DataFieldRow : FieldRow {
}
public void exit_edit_mode (bool save) {
- var parent_container = (this.get_parent () as Container);
- parent_container.disconnect (set_focus_child_id);
+ var parent = this.get_parent ();
+ if (parent != null) {
+ var parent_container = (parent as Container);
+ parent_container.disconnect (set_focus_child_id);
+ }
var changed = finish_edit_widgets (save);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]