Fix crash when loading DCPs whose ASSETMAP contains files that are
[libdcp.git] / src / dcp.cc
index 3400041207d6fb5e077290eb1dd9f4a596782758..2011f04e52cdb515af362abc8939268d3c8d9fa1 100644 (file)
@@ -211,7 +211,12 @@ DCP::read (bool keep_going, ReadErrors* errors, bool ignore_incorrect_picture_mx
                        }
                }
 
-               DCP_ASSERT (pkl_type);
+               if (!pkl_type) {
+                       /* This asset is in the ASSETMAP but not mentioned in any PKL so we don't
+                        * need to worry about it.
+                        */
+                       continue;
+               }
 
                if (*pkl_type == CPL::static_pkl_type(*_standard) || *pkl_type == InteropSubtitleAsset::static_pkl_type(*_standard)) {
                        xmlpp::DomParser* p = new xmlpp::DomParser;