mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Fix access to CPrologEpilogVideo after destruction from sound callback
This commit is contained in:
@@ -322,6 +322,13 @@ void CSoundHandler::setCallback(int channel, std::function<void()> function)
|
||||
iter->second.push_back(function);
|
||||
}
|
||||
|
||||
void CSoundHandler::resetCallback(int channel)
|
||||
{
|
||||
boost::mutex::scoped_lock lockGuard(mutexCallbacks);
|
||||
|
||||
callbacks.erase(channel);
|
||||
}
|
||||
|
||||
void CSoundHandler::soundFinishedCallback(int channel)
|
||||
{
|
||||
boost::mutex::scoped_lock lockGuard(mutexCallbacks);
|
||||
|
||||
Reference in New Issue
Block a user