Fix T72252: crash running ocean bake in background mode

This commit is contained in:
Brecht Van Lommel
2019-12-08 13:44:46 +01:00
parent 9569425b02
commit 2901986b10

View File

@@ -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);
}
}
/** \} */