Skip to content

Commit c8ac42a

Browse files
Merge pull request AUTOMATIC1111#15533 from travisg/callback-fix
fix: remove_callbacks_for_function should also remove from the ordered map
2 parents 449bc7b + bba306d commit c8ac42a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/script_callbacks.py

+3
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@ def remove_callbacks_for_function(callback_func):
448448
for callback_list in callback_map.values():
449449
for callback_to_remove in [cb for cb in callback_list if cb.callback == callback_func]:
450450
callback_list.remove(callback_to_remove)
451+
for ordered_callback_list in ordered_callbacks_map.values():
452+
for callback_to_remove in [cb for cb in ordered_callback_list if cb.callback == callback_func]:
453+
ordered_callback_list.remove(callback_to_remove)
451454

452455

453456
def on_app_started(callback, *, name=None):

0 commit comments

Comments
 (0)