diff options
author | Evgeny Khramtsov <xramtsov@gmail.com> | 2015-08-28 15:23:00 +0300 |
---|---|---|
committer | Evgeny Khramtsov <xramtsov@gmail.com> | 2015-08-28 15:23:00 +0300 |
commit | 3ed75890cb9e55e62a6195c6a4159b31259580c2 (patch) | |
tree | 2c38348e7a0fc23f0c20fdbcf3e126a13d712593 | |
parent | Remove "--enable-json" flag (diff) | |
parent | get_room_options will not crash in case of query for a non-existent room (diff) |
Merge pull request #721 from oxpa/muc_admin
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), |