Changeset

2631:2bfa7d476092

mod_http_roster_admin: Don't call callback if it's nil
author JC Brand <jc@opkode.com>
date Tue, 21 Mar 2017 09:43:03 +0000
parents 2630:96eb1c4f9ff7
children 2632:995d4d9f5d89
files mod_http_roster_admin/mod_http_roster_admin.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_roster_admin/mod_http_roster_admin.lua	Tue Mar 21 09:31:13 2017 +0000
+++ b/mod_http_roster_admin/mod_http_roster_admin.lua	Tue Mar 21 09:43:03 2017 +0000
@@ -118,7 +118,9 @@
 			removed = removed + 1;
 		end
 		module:log("debug", "User %s: added %d new contacts, removed %d contacts", username, added, removed);
-		cb(true);
+		if cb ~= nil then
+			cb(true);
+		end
 	end);
 end