about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/roster_list.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xmpp/roster_list.c b/src/xmpp/roster_list.c
index 3dadb884..49f067d6 100644
--- a/src/xmpp/roster_list.c
+++ b/src/xmpp/roster_list.c
@@ -140,6 +140,8 @@ roster_update_presence(const char *const barejid, Resource *resource, GDateTime
 
     PContact contact = roster_get_contact(barejid);
     if (contact == NULL) {
+        /* Don't lose resource when there is no owner. */
+        resource_destroy(resource);
         return FALSE;
     }
     if (!_datetimes_equal(p_contact_last_activity(contact), last_activity)) {