diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-05-21 18:37:11 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-05-21 18:37:11 +0300 |
commit | f6062638c15754a7a88cc4f97fe2e656c73e6871 (patch) | |
tree | 56718b1e5f3206f8c2d7152462a5512f636284de /source | |
parent | a39efae03d75debaff208797a925a0f137cd7de9 (diff) |
Fix crash in blenderplayer when scrubbing off screen.
Was cache referencing deleted or NULL items.
Reported by Kopias on irc
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index 81e0b0e2605..c2594cc4627 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -1154,10 +1154,10 @@ static char *wm_main_playanim_intern(int argc, const char **argv) /* really basic memory conservation scheme. Keep frames in a fifo queue */ node = inmempicsbase.last; - while (added_images > PLAY_FRAME_CACHE_MAX) { + while (node && added_images > PLAY_FRAME_CACHE_MAX) { PlayAnimPict *pic = node->data; - if (pic->ibuf != ibuf) { + if (pic->ibuf && pic->ibuf != ibuf) { LinkData *node_tmp; IMB_freeImBuf(pic->ibuf); pic->ibuf = NULL; @@ -1281,6 +1281,9 @@ static char *wm_main_playanim_intern(int argc, const char **argv) #endif BLI_freelistN(&picsbase); + + BLI_freelistN(&inmempicsbase); + added_images = 0; #if 0 // XXX25 free_blender(); #else |