util.filters: Ignore filters being added twice (fixes issues on removal) 0.9.5
authorMatthew Wild <mwild1@gmail.com>
Thu, 28 Aug 2014 09:20:33 +0100
changeset 6366 8dee696c33cc
parent 6365 75bd55e84112
child 6367 769a3577dd85
child 6369 84c50a9addbc
util.filters: Ignore filters being added twice (fixes issues on removal)
util/filters.lua
--- a/util/filters.lua	Thu Aug 28 09:17:07 2014 +0100
+++ b/util/filters.lua	Thu Aug 28 09:20:33 2014 +0100
@@ -45,6 +45,8 @@
 	if not filter_list then
 		filter_list = {};
 		session.filters[type] = filter_list;
+	elseif filter_list[callback] then
+		return; -- Filter already added
 	end
 	
 	priority = priority or 0;