[gnome-contacts/wip/nielsdg/fix-right-click-segfault: 3/3] ContactList: fix segfault when right-clicking.
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/nielsdg/fix-right-click-segfault: 3/3] ContactList: fix segfault when right-clicking.
- Date: Thu, 13 Sep 2018 09:22:09 +0000 (UTC)
commit 13f9f53c9eb84b4e6c9a321aa52b661685507c7c
Author: Niels De Graef <nielsdegraef gmail com>
Date: Thu Sep 13 00:22:05 2018 +0200
ContactList: fix segfault when right-clicking.
Fixes #104
src/contacts-contact-list.vala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/contacts-contact-list.vala b/src/contacts-contact-list.vala
index 4f75316..2d39739 100644
--- a/src/contacts-contact-list.vala
+++ b/src/contacts-contact-list.vala
@@ -282,8 +282,10 @@ public class Contacts.ContactList : ListBox {
if (event.button == Gdk.BUTTON_SECONDARY) {
var row = (ContactDataRow) get_row_at_y ((int) Math.round (event.y));
- select_row (row);
- row.selector_button.active = (this.state != UiState.SELECTING) || !row.selector_button.active;
+ if (row != null) {
+ select_row (row);
+ row.selector_button.active = this.state != UiState.SELECTING || !row.selector_button.active;
+ }
}
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]