mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix access to CPrologEpilogVideo after destruction from sound callback
This commit is contained in:
@@ -74,6 +74,7 @@ void CPrologEpilogVideo::show(Canvas & to)
|
||||
void CPrologEpilogVideo::clickPressed(const Point & cursorPosition)
|
||||
{
|
||||
close();
|
||||
CCS->soundh->resetCallback(voiceSoundHandle); // reset callback to avoid memory corruption since 'this' will be destroyed
|
||||
CCS->soundh->stopSound(voiceSoundHandle);
|
||||
CCS->soundh->stopSound(videoSoundHandle);
|
||||
if(exitCb)
|
||||
|
||||
Reference in New Issue
Block a user