Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-11-17 22:07:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2014-11-17 22:09:06 +0300
commit7019c2bb7f9b8fd27e8f0cc5b72b262e2de584a9 (patch)
tree71112c418032a1849d405fe01c9f0d86ddfc8612 /source/blender/editors/screen/screen_ops.c
parent0b6631414b031f1ddd0ab2288ecdafdb909f15bd (diff)
Alternate fix for T42619: NULL check in caller
Rather avoid paranoid style, (wm == NULL) is an exceptional case.
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r--source/blender/editors/screen/screen_ops.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index f8db1961f53..4828e6e512c 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -3523,13 +3523,14 @@ static void SCREEN_OT_animation_step(wmOperatorType *ot)
/* find window that owns the animation timer */
bScreen *ED_screen_animation_playing(const wmWindowManager *wm)
{
- wmWindow *window;
+ wmWindow *win;
+
+ for (win = wm->windows.first; win; win = win->next) {
+ if (win->screen->animtimer) {
+ return win->screen;
+ }
+ }
- if (wm)
- for (window = wm->windows.first; window; window = window->next)
- if (window->screen->animtimer)
- return window->screen;
-
return NULL;
}