mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Fix crash on playing spellbook pageflip video
Was reported on Discord. - Fixes corrupted name of spellbook page flip video - Fixes possible crash on deleting invalid video instance
This commit is contained in:
@@ -376,7 +376,7 @@ FFMpegStream::~FFMpegStream()
|
||||
|
||||
// for some reason, buffer is managed (e.g. reallocated) by FFmpeg
|
||||
// however, it must still be freed manually by user
|
||||
if (context->buffer)
|
||||
if (context && context->buffer)
|
||||
av_free(context->buffer);
|
||||
av_free(context);
|
||||
}
|
||||
|
@@ -520,7 +520,7 @@ void CSpellWindow::turnPageRight()
|
||||
{
|
||||
OBJECT_CONSTRUCTION;
|
||||
if(settings["video"]["spellbookAnimation"].Bool() && !isBigSpellbook)
|
||||
video = std::make_shared<VideoWidgetOnce>(Point(13, 14), VideoPath::builtin("PGTRNRENGINE->SMK"), false, this);
|
||||
video = std::make_shared<VideoWidgetOnce>(Point(13, 14), VideoPath::builtin("PGTRNRGH.SMK"), false, this);
|
||||
}
|
||||
|
||||
void CSpellWindow::onVideoPlaybackFinished()
|
||||
|
Reference in New Issue
Block a user