From Laurens Voerman, "while debugging ImageSequence I had a crash, due to the very large frametimes caused by halting the program. The problem is that when the frame time exceeds the length of the entire image sequence, a looping sequence will try to read it's _imageDataList beyond its size.

fix attached for  src/osg/ImageSequence.cpp"



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14292 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-06-26 10:24:39 +00:00
parent 94e7f4e860
commit fb09bd6c12

View File

@@ -396,17 +396,8 @@ void ImageSequence::update(osg::NodeVisitor* nv)
if (startLoadIndex<0) startLoadIndex = 0;
int endLoadIndex = int(preLoadTime/_timePerImage);
if (endLoadIndex>=int(_imageDataList.size()))
{
if (looping)
{
endLoadIndex -= int(_imageDataList.size());
}
else
{
endLoadIndex = int(_imageDataList.size())-1;
}
}
if (looping && (endLoadIndex>=int(_imageDataList.size()))) endLoadIndex -= int(_imageDataList.size());
if (endLoadIndex>=int(_imageDataList.size())) endLoadIndex = int(_imageDataList.size())-1;
if (endLoadIndex<0) endLoadIndex = 0;
double requestTime = time;