From 3d5d1ecbe41666dccf9eaa184e9b19ccad2f32c3 Mon Sep 17 00:00:00 2001 From: oxpa Date: Fri, 28 Aug 2015 03:34:51 -0800 Subject: [PATCH] get_room_options will not crash in case of query for a non-existent room --- src/mod_muc_admin.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index 4741a23e1..b779f4e0b 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -816,8 +816,10 @@ change_option(Option, Value, Config) -> %%---------------------------- get_room_options(Name, Service) -> - Pid = get_room_pid(Name, Service), - get_room_options(Pid). + case get_room_pid(Name, Service) of + room_not_found -> []; + Pid -> get_room_options(Pid) + end. get_room_options(Pid) -> Config = get_room_config(Pid),