Unlocked a mutex after modifying the associated variable (#5625)
* Unlocked a mutex after modifying the variable the mutex was meant for. This fixes an issue where mounting bundles in the Editor was causing the Editor to freeze up, because the following line, m_levelOpenEvent.Signal, resulted in another attempt to lock that same mutex. Signed-off-by: AMZN-stankowi <4838196+AMZN-stankowi@users.noreply.github.com> * Added a comment describing why the unlock is necessary. Signed-off-by: AMZN-stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
This commit is contained in:
@@ -1241,6 +1241,10 @@ namespace AZ::IO
|
||||
|
||||
m_arrZips.insert(revItZip.base(), desc);
|
||||
|
||||
// This lock is for m_arrZips.
|
||||
// Unlock it now because the modification is complete, and events responding to this signal
|
||||
// will attempt to lock the same mutex, causing the application to lock up.
|
||||
lock.unlock();
|
||||
m_levelOpenEvent.Signal(levelDirs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user