Skip to content

Commit

Permalink
get_room_options will not crash in case of query for a non-existent room
Browse files Browse the repository at this point in the history
  • Loading branch information
oxpa committed Aug 28, 2015
1 parent 832f6d3 commit 3d5d1ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mod_muc_admin.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 3d5d1ec

Please sign in to comment.