From 4c74c172e3ae8f3c418f706db3e789456c689d39 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 10 Aug 2020 21:15:17 +1000 Subject: [PATCH] - fix screenjob.cpp `PlayVideo()` returning after stripping drive letter without checking whether it was able to re-open the file thereafter successfully. Fixes #128. --- source/core/screenjob.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/core/screenjob.cpp b/source/core/screenjob.cpp index a4746a580..a12489d1c 100644 --- a/source/core/screenjob.cpp +++ b/source/core/screenjob.cpp @@ -341,8 +341,11 @@ DScreenJob* PlayVideo(const char* filename, const AnimSound* ans, const int* fra filename += 3; fr = fileSystem.OpenFileReader(filename); } - Printf("%s: Unable to open video\n", filename); - return nothing(); + if (!fr.isOpen()) + { + Printf("%s: Unable to open video\n", filename); + return nothing(); + } } char id[20] = {};