Software /
code /
prosody
Diff
util/filters.lua @ 3135:f29a297471e3
util.filters: Don't traceback when trying to remove a filter from an uninitialized object
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 02 Jun 2010 12:24:07 +0100 |
parent | 3134:9a29ad6a9b97 |
child | 3139:7b4f180d7c6f |
line wrap: on
line diff
--- a/util/filters.lua Wed Jun 02 12:23:07 2010 +0100 +++ b/util/filters.lua Wed Jun 02 12:24:07 2010 +0100 @@ -46,6 +46,7 @@ end function remove_filter(session, type, callback) + if not session.filters then return; end local filter_list = session.filters[type]; if filter_list and filter_list[callback] then for i=1, #filter_list do