mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
correctly handle C-only intervals
This commit is contained in:
parent
6a22f406ca
commit
34631c0fb3
@ -66,6 +66,7 @@ class IntervalManager(CIntervalManager):
|
|||||||
index = self.findCInterval(interval.getName())
|
index = self.findCInterval(interval.getName())
|
||||||
if index >= 0:
|
if index >= 0:
|
||||||
self.removeCInterval(index)
|
self.removeCInterval(index)
|
||||||
|
if index < len(self.ivals):
|
||||||
self.ivals[index] = None
|
self.ivals[index] = None
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
@ -73,7 +74,10 @@ class IntervalManager(CIntervalManager):
|
|||||||
def getInterval(self, name):
|
def getInterval(self, name):
|
||||||
index = self.findCInterval(name)
|
index = self.findCInterval(name)
|
||||||
if index >= 0:
|
if index >= 0:
|
||||||
|
if index < len(self.ivals) and self.ivals[index]:
|
||||||
return self.ivals[index]
|
return self.ivals[index]
|
||||||
|
# It must be a C-only interval.
|
||||||
|
return self.getCInterval(index)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def finishIntervalsMatching(self, pattern):
|
def finishIntervalsMatching(self, pattern):
|
||||||
@ -86,7 +90,7 @@ class IntervalManager(CIntervalManager):
|
|||||||
# Finish and remove this interval. Finishing it
|
# Finish and remove this interval. Finishing it
|
||||||
# automatically removes it.
|
# automatically removes it.
|
||||||
count += 1
|
count += 1
|
||||||
if self.ivals[index]:
|
if index < len(self.ivals) and self.ivals[index]:
|
||||||
# Finish the python version if we have it
|
# Finish the python version if we have it
|
||||||
self.ivals[index].finish()
|
self.ivals[index].finish()
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user