Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sugar/presence/activity.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sugar/presence/activity.py b/sugar/presence/activity.py
index 2ddcd92..6c4a549 100644
--- a/sugar/presence/activity.py
+++ b/sugar/presence/activity.py
@@ -230,8 +230,10 @@ class Activity(gobject.GObject):
so we can get the buddy without calling PS.
"""
object_path = self._handle_to_buddy_path.get(handle, None)
- buddy = self._ps_new_object(object_path)
- return buddy
+ if object_path:
+ buddy = self._ps_new_object(object_path)
+ return buddy
+ return None
def invite(self, buddy, message, response_cb):
"""Invite the given buddy to join this activity.