Fix Cycles assert in debug mode after recent changes

We sometimes call start() on already started renders, just do nothing then.

Ref D14086
This commit is contained in:
Brecht Van Lommel 2022-02-14 15:33:47 +01:00
parent 993839ce85
commit 65d4c58060
1 changed files with 4 additions and 1 deletions

View File

@ -110,7 +110,10 @@ void Session::start()
{
/* Signal session thread to start rendering. */
thread_scoped_lock session_thread_lock(session_thread_mutex_);
assert(session_thread_state_ == SESSION_THREAD_WAIT);
if (session_thread_state_ == SESSION_THREAD_RENDER) {
/* Already rendering, nothing to do. */
return;
}
session_thread_state_ = SESSION_THREAD_RENDER;
}