Changeset

6366:8dee696c33cc 0.9.5

util.filters: Ignore filters being added twice (fixes issues on removal)
author Matthew Wild <mwild1@gmail.com>
date Thu, 28 Aug 2014 09:20:33 +0100
parents 6365:75bd55e84112
children 6367:769a3577dd85 6369:84c50a9addbc
files util/filters.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;