[gnome-contacts] Don't crash if a contact has no client types.
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Don't crash if a contact has no client types.
- Date: Wed, 29 Jun 2011 07:25:27 +0000 (UTC)
commit cc21627c60aecbf3f978c75b500707a9a4f8c853
Author: Travis Reitter <treitter gmail com>
Date: Tue Jun 28 10:09:25 2011 -0700
Don't crash if a contact has no client types.
src/contacts-contact.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index 27cb8f9..d50e26c 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -479,7 +479,8 @@ public class Contacts.Contact : GLib.Object {
return false;
var types = tp.contact.get_client_types ();
- return types[0] == "phone";
+
+ return (types != null && types[0] == "phone");
}
private void update_presence () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]