diff options
author | oxpa <iippolitov@gmail.com> | 2015-08-28 03:34:51 -0800 |
---|---|---|
committer | oxpa <iippolitov@gmail.com> | 2015-08-28 03:34:51 -0800 |
commit | 3d5d1ecbe41666dccf9eaa184e9b19ccad2f32c3 (patch) | |
tree | 5325262a72c1e5a66a9626a65a0a4e6c05d4fa32 | |
parent | Always include RSM in final message (diff) |
get_room_options will not crash in case of query for a non-existent room
-rw-r--r-- | src/mod_muc_admin.erl | 6 |
1 files 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), |