From 2492bc46d0ce4073d5187c83485d90f40834c1a2 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 5 Mar 2014 12:12:47 +0100 Subject: [PATCH] Handle error when requesting information of a non-existing shared roster (fixes #14) --- mod_admin_extra/src/mod_admin_extra.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod_admin_extra/src/mod_admin_extra.erl b/mod_admin_extra/src/mod_admin_extra.erl index 41f05e5..c5060f0 100644 --- a/mod_admin_extra/src/mod_admin_extra.erl +++ b/mod_admin_extra/src/mod_admin_extra.erl @@ -1332,7 +1332,10 @@ srg_list(Host) -> lists:sort(mod_shared_roster:list_groups(Host)). srg_get_info(Group, Host) -> - Opts = mod_shared_roster:get_group_opts(Host,Group), + Opts = case mod_shared_roster:get_group_opts(Host,Group) of + Os when is_list(Os) -> Os; + error -> [] + end, [{io_lib:format("~p", [Title]), io_lib:format("~p", [Value])} || {Title, Value} <- Opts].