If mod_last is disabled, return error instead of crashing (#2330)

This commit is contained in:
Badlop 2018-03-20 22:18:43 +01:00
parent 8962397cf3
commit b4b3ff50d6
1 changed files with 3 additions and 1 deletions

View File

@ -188,7 +188,9 @@ get_last(LUser, LServer) ->
?LAST_CACHE, {LUser, LServer},
fun() -> Mod:get_last(LUser, LServer) end);
false ->
Mod:get_last(LUser, LServer)
Mod:get_last(LUser, LServer);
undefined ->
error
end,
case Res of
{ok, {TimeStamp, Status}} -> {ok, TimeStamp, Status};