From ec1d4060984ab8c329002023df589aff5621c4aa Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Fri, 5 Sep 2008 03:41:40 +0000 Subject: [PATCH] 0002309: Crash rerunning report after deleting used filter. svn: r11020 --- src/PluginUtils/_MenuOptions.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/PluginUtils/_MenuOptions.py b/src/PluginUtils/_MenuOptions.py index e7800f313..2841f5ec6 100644 --- a/src/PluginUtils/_MenuOptions.py +++ b/src/PluginUtils/_MenuOptions.py @@ -354,6 +354,18 @@ class EnumeratedListOption(Option): """ self.__items = [] self.emit('options-changed') + + def get_value(self): + """ + Get the value of this option. + + @return: The option value. + """ + value = Option.get_value(self) + if value >= len(self.__items): + # Range check the value + value = 0 + return value #------------------------------------------------------------------------- #