Explorar o código

possible fix for TT crash 27637

Redmond Urbino %!s(int64=19) %!d(string=hai) anos
pai
achega
4888072b58
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      direct/src/gui/DirectScrolledList.py

+ 6 - 0
direct/src/gui/DirectScrolledList.py

@@ -186,6 +186,12 @@ class DirectScrolledList(DirectFrame):
         """ scrolls list so selected index is at top, or centered in box"""
         """ scrolls list so selected index is at top, or centered in box"""
         assert self.notify.debugStateCall(self)
         assert self.notify.debugStateCall(self)
         # print "scrollTo[", index,"] called, len(self[items])=", len(self["items"])," self[numItemsVisible]=", self["numItemsVisible"]
         # print "scrollTo[", index,"] called, len(self[items])=", len(self["items"])," self[numItemsVisible]=", self["numItemsVisible"]
+        try:
+            self["numItemsVisible"]
+        except:
+            # RAU hack to kill 27637
+            self.notify.info('crash 27637 fixed!')
+            return
 
 
         numItemsVisible=self["numItemsVisible"]
         numItemsVisible=self["numItemsVisible"]
         numItemsTotal = len(self["items"])
         numItemsTotal = len(self["items"])