diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-05-07 10:25:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-05-07 11:13:23 +0300 |
commit | ac2941fb15fafcf28907d84304b48d6f7e14e65f (patch) | |
tree | a67b5b8e8caf7cb9706115c0232dada2965d85b7 | |
parent | a7b72e624cc6bc2e8931ac33e98ae49069b7db3c (diff) |
Fix use of imbuf that was never valid in animation player
Resizing the window would always draw the image with an empty imbuf.
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index 7726eb1b5d3..a209930f978 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -132,9 +132,6 @@ typedef struct PlayState { int ibufx, ibufy; int fontid; - /* saves passing args */ - struct ImBuf *curframe_ibuf; - /* restarts player for file drop */ char dropped_file[FILE_MAX]; @@ -958,9 +955,9 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) case GHOST_kKeyNumpadSlash: if (val) { if (g_WS.qual & WS_QUAL_SHIFT) { - if (ps->curframe_ibuf) { + if (ps->picture && ps->picture->ibuf) { printf(" Name: %s | Speed: %.2f frames/s\n", - ps->curframe_ibuf->name, + ps->picture->ibuf->name, ps->fstep / swaptime); } } @@ -1197,7 +1194,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) playanim_gl_matrix(); ptottime = 0.0; - playanim_toscreen(ps, ps->picture, ps->curframe_ibuf, ps->fontid, ps->fstep); + playanim_toscreen( + ps, ps->picture, ps->picture ? ps->picture->ibuf : NULL, ps->fontid, ps->fstep); break; } |