From 26848e99e4698c59553c38ed0c76ca8e575f2ffc Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 14 Jun 2011 14:36:15 +0200 Subject: [PATCH] AIFetchInventoryFolder bug fix. Forgot to initialize AIFetchInventoryFolder::mCreate. Also changed assert as it's possible that a statemachine is in state bs_initialize while checking for idle statemachines and another, already running statemachine created the new statemachine. --- indra/newview/statemachine/aifetchinventoryfolder.h | 1 + indra/newview/statemachine/aistatemachine.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/statemachine/aifetchinventoryfolder.h b/indra/newview/statemachine/aifetchinventoryfolder.h index c83c3ef1b..9a818fa36 100644 --- a/indra/newview/statemachine/aifetchinventoryfolder.h +++ b/indra/newview/statemachine/aifetchinventoryfolder.h @@ -79,6 +79,7 @@ class AIFetchInventoryFolder : public AIStateMachine { void fetch(LLUUID const& parentUUID, std::string const& foldername, bool create = false, bool fetch_contents = true) { mParentFolder = parentUUID; + mCreate = create; mFetchContents = fetch_contents; if (mFolderName != foldername) { diff --git a/indra/newview/statemachine/aistatemachine.cpp b/indra/newview/statemachine/aistatemachine.cpp index e8a0d99de..2eccfb53e 100644 --- a/indra/newview/statemachine/aistatemachine.cpp +++ b/indra/newview/statemachine/aistatemachine.cpp @@ -343,7 +343,7 @@ void AIStateMachine::mainloop(void*) } else { - llassert(statemachine.mState == bs_run); + llassert(statemachine.mState == bs_run || statemachine.mState == bs_initialize); ++iter; } }