From a6d0e9765a312f15d47ccea9bc0ac431020e5a87 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 12 Mar 2011 06:29:31 +0000 Subject: [PATCH] protect from self-modifying callbacks --- direct/src/showbase/ShowBase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 12114fd488..619fba962d 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -432,7 +432,7 @@ class ShowBase(DirectObject.DirectObject): This function is designed to be safe to call multiple times.""" - for cb in self.finalExitCallbacks: + for cb in self.finalExitCallbacks[:]: cb() # [gjeon] restore sticky key settings