aboutsummaryrefslogtreecommitdiffstats
path: root/util/jid.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-09-30 19:49:36 +0100
committerMatthew Wild <mwild1@gmail.com>2008-09-30 19:49:36 +0100
commit733c39e3dacf91f10fcb2f9501b6f0618a0b11fc (patch)
tree5197e57faff61e89413fcd138372dcb3591ff692 /util/jid.lua
parenteabe25e8a4de6a2238559330909401e5be31998d (diff)
downloadprosody-733c39e3dacf91f10fcb2f9501b6f0618a0b11fc.tar.gz
prosody-733c39e3dacf91f10fcb2f9501b6f0618a0b11fc.zip
jid.split(): Return nil when passed nil
Diffstat (limited to 'util/jid.lua')
-rw-r--r--util/jid.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/jid.lua b/util/jid.lua
index b7116fdf..28dd1a92 100644
--- a/util/jid.lua
+++ b/util/jid.lua
@@ -4,6 +4,7 @@ local match = string.match;
module "jid"
function split(jid)
+ if not jid then return nil; end
local node = match(jid, "^([^@]+)@");
local server = (node and match(jid, ".-@([^@/]+)")) or match(jid, "^([^@/]+)");
local resource = match(jid, "/(.+)$");