Fix a couple of places where we could segfault while looking at a VF. v1.8.92
authorCarl Hetherington <cth@carlh.net>
Fri, 29 Dec 2023 00:31:20 +0000 (01:31 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 3 Jan 2024 22:48:45 +0000 (23:48 +0100)
src/verify.cc

index f20c046d02ad29e93745c20a54eaddf46989a1bb..c7a4f78f44e234d319a4a8a9a67c90802e40565e 100644 (file)
@@ -1265,7 +1265,7 @@ verify_text_details(dcp::Standard standard, vector<shared_ptr<Reel>> reels, vect
                return;
        }
 
-       if (reels[0]->main_subtitle()) {
+       if (reels[0]->main_subtitle() && reels[0]->main_subtitle()->asset_ref().resolved()) {
                verify_text_details(standard, reels, reels[0]->main_subtitle()->edit_rate().numerator, notes,
                        [](shared_ptr<Reel> reel) {
                                return static_cast<bool>(reel->main_subtitle());
@@ -1713,7 +1713,7 @@ verify_cpl(
 
                LinesCharactersResult result;
                for (auto reel: cpl->reels()) {
-                       if (reel->main_subtitle() && reel->main_subtitle()->asset()) {
+                       if (reel->main_subtitle() && reel->main_subtitle()->asset_ref().resolved()) {
                                verify_text_lines_and_characters(reel->main_subtitle()->asset(), 52, 79, &result);
                        }
                }