diff --git a/multi_user/preferences.py b/multi_user/preferences.py index 388fe86..dde880f 100644 --- a/multi_user/preferences.py +++ b/multi_user/preferences.py @@ -100,7 +100,13 @@ def set_log_level(self, value): logging.getLogger().setLevel(value) def set_active_replay(self, value): - max_index = len(bpy.context.window_manager.session.replay_files)-1 + files_count = len(bpy.context.window_manager.session.replay_files) + + if files_count == 0: + return + + max_index = files_count-1 + if value > max_index: value = max_index