hedgewars/avwrapper/avwrapper.c
changeset 14950 00cf807b7faa
parent 13542 ecdf6ce2301e
--- a/hedgewars/avwrapper/avwrapper.c	Tue May 14 21:36:50 2019 +0300
+++ b/hedgewars/avwrapper/avwrapper.c	Tue May 14 20:58:39 2019 +0200
@@ -367,6 +367,8 @@
         VideoTime = (double)g_pVFrame->pts * g_pVStream->time_base.num/g_pVStream->time_base.den;
         do
         {
+            if (!g_pAFrame)
+                return FatalError("Error while writing video frame: g_pAFrame does not exist");
             AudioTime = (double)g_pAFrame->pts * g_pAStream->time_base.num/g_pAStream->time_base.den;
             ret = WriteAudioFrame();
         }