From b5d2e584f484c5064973915060572961de143709 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 2 Jun 2010 12:24:07 +0100 Subject: util.filters: Don't traceback when trying to remove a filter from an uninitialized object --- util/filters.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'util') diff --git a/util/filters.lua b/util/filters.lua index af5b8d2d..123226c5 100644 --- a/util/filters.lua +++ b/util/filters.lua @@ -46,6 +46,7 @@ function add_filter(session, type, callback, priority) 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 -- cgit v1.2.3