File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -122,12 +122,12 @@ def notify_observers(self, notification: INotification) -> None:
122122 """
123123 # Get a reference to the observer list for this notification name
124124 with self .observerMapLock :
125- observers = self .observerMap .get (notification .name )
125+ # Copy observers (observers[:]) from reference array to a working array,
126+ observers = list (self .observerMap .get (notification .name ) or [])
126127
127- # Copy observers (observers[:]) from reference array to a working array,
128128 # since the reference array may change during the notification loo
129129 # Safe iteration, create a shallow copy of observers or use an empty list if observers is None or falsy.
130- for observer in list ( observers or []) :
130+ for observer in observers :
131131 # Notify Observers from the working array
132132 observer .notify_observer (notification )
133133
You can’t perform that action at this time.
0 commit comments