diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-12-08 15:44:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-12-08 15:44:46 +0300 |
commit | 2901986b10bdaf12e050de18797f8a3e9d6a9a34 (patch) | |
tree | e19c3ccf78e979177dadd4dd6c4eb0a1aa034913 /source/blender/windowmanager | |
parent | 9569425b027cdb1c80e407697971f42fbee42388 (diff) |
Fix T72252: crash running ocean bake in background mode
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index fb0c60605a7..e68d4902c66 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1885,12 +1885,17 @@ void WM_clipboard_text_set(const char *buf, bool selection) void WM_progress_set(wmWindow *win, float progress) { - GHOST_SetProgressBar(win->ghostwin, progress); + /* In background mode we may have windows, but not actual GHOST windows. */ + if (win->ghostwin) { + GHOST_SetProgressBar(win->ghostwin, progress); + } } void WM_progress_clear(wmWindow *win) { - GHOST_EndProgressBar(win->ghostwin); + if (win->ghostwin) { + GHOST_EndProgressBar(win->ghostwin); + } } /** \} */ |