diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-07 18:54:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-07 18:54:42 +0400 |
commit | 180a9f1a81ba0ba115973ee0c10fb3a290d2a687 (patch) | |
tree | d03324ea453bfc6b105a7c519e5467d5de876798 /source/blender/windowmanager/intern/wm_jobs.c | |
parent | ae8bba216596d58bc72f85b7c3bf5b61a9c87e8a (diff) |
fix for crash with the job system progress bar on load, matt you may want to check if this case should be happening at all.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_jobs.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_jobs.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index e7df703ba79..c3ad8f96cb0 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -449,12 +449,15 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) } } - /* if there are running jobs, set the global progress indicator */ - if (jobs_progress > 0) { - float progress = total_progress / (float)jobs_progress; - WM_progress_set(wm->winactive, progress); - } else { - WM_progress_clear(wm->winactive); + /* on file load 'winactive' can be NULL, possibly it should not happen but for now do a NULL check - campbell */ + if(wm->winactive) { + /* if there are running jobs, set the global progress indicator */ + if (jobs_progress > 0) { + float progress = total_progress / (float)jobs_progress; + WM_progress_set(wm->winactive, progress); + } else { + WM_progress_clear(wm->winactive); + } } } |