movie::frame_subframes: Gracefully handle invalid frame numbers
Doesn't fix cache invalidation errors tho.
This commit is contained in:
parent
6d1a67719b
commit
d8048863e8
1 changed files with 2 additions and 0 deletions
|
@ -308,6 +308,8 @@ size_t movie::restore_state(uint64_t curframe, uint64_t lagframe, const std::vec
|
|||
|
||||
uint64_t movie::frame_subframes(uint64_t frame) throw()
|
||||
{
|
||||
if(!frame) return 0;
|
||||
if(frame > movie_data->size()) return 0;
|
||||
if(frame < cached_frame)
|
||||
clear_caches();
|
||||
uint64_t p = cached_subframe;
|
||||
|
|
Loading…
Add table
Reference in a new issue