Sfoglia il codice sorgente

Merge pull request #5714 from IvanSavenko/spellbook_fix

Fix crash on playing spellbook pageflip video
Ivan Savenko 5 mesi fa
parent
commit
e87bbf210e
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      client/media/CVideoHandler.cpp
  2. 1 1
      client/windows/CSpellWindow.cpp

+ 1 - 1
client/media/CVideoHandler.cpp

@@ -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);
 }

+ 1 - 1
client/windows/CSpellWindow.cpp

@@ -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()