From b6f6dfbe9917ee894ba9ab3a7c8cfa180bee3fcd Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 27 May 2013 02:15:28 +0200 Subject: [PATCH] Fix french assert. Fixes a possible ASSERT(!(need_new_run && !mYieldEngine && sub_state_r->run_state == run_state)). When over all multiplex_impl functions and this is the only case that I found where it could return without changing the state and without calling either idle() or yield(). --- indra/aistatemachine/aistatemachinethread.cpp | 3 +++ indra/newview/statemachine/aifilepicker.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/indra/aistatemachine/aistatemachinethread.cpp b/indra/aistatemachine/aistatemachinethread.cpp index f45d1e845..caeddea5c 100644 --- a/indra/aistatemachine/aistatemachinethread.cpp +++ b/indra/aistatemachine/aistatemachinethread.cpp @@ -101,7 +101,10 @@ void AIStateMachineThreadBase::multiplex_impl(state_type run_state) break; case wait_stopped: if (!mThread->isStopped()) + { + yield(); break; + } // We're done! // // We can only get here when AIThreadImpl::done called cont(), (very diff --git a/indra/newview/statemachine/aifilepicker.cpp b/indra/newview/statemachine/aifilepicker.cpp index 418d83955..3cc3ccbcd 100644 --- a/indra/newview/statemachine/aifilepicker.cpp +++ b/indra/newview/statemachine/aifilepicker.cpp @@ -420,6 +420,7 @@ void AIFilePicker::multiplex_impl(state_type run_state) // Store folder of first filename as context. AIFilePicker::store_folder(mContext, getFolder()); finish(); + break; } } }