Fixed an issue where videos would sometimes not play when exiting the media viewer.

This commit is contained in:
Leon Styhre 2021-05-24 18:39:52 +02:00
parent ccb4c19d78
commit 9b395d6526

View file

@ -55,9 +55,9 @@ bool MediaViewer::startMediaViewer(FileData* game)
void MediaViewer::stopMediaViewer() void MediaViewer::stopMediaViewer()
{ {
NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND); NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND);
ViewController::get()->onStopVideo();
if (mVideo) { if (mVideo) {
ViewController::get()->onStopVideo();
delete mVideo; delete mVideo;
mVideo = nullptr; mVideo = nullptr;
} }