AAF: fix NULL pointer dereference
This commit is contained in:
@@ -590,18 +590,23 @@ ARDOUR_UI::new_session_from_aaf (string const& aaf, string const& target_dir, st
|
||||
}
|
||||
|
||||
int essenceError = 0;
|
||||
char* essenceName = aafAudioClip->essencePointerList->essenceFile->name;
|
||||
char* essenceName = NULL;
|
||||
|
||||
AAFI_foreachEssencePointer (aafAudioClip->essencePointerList, aafAudioEssencePtr)
|
||||
{
|
||||
struct aafiAudioEssenceFile* audioEssenceFile = aafAudioEssencePtr->essenceFile;
|
||||
|
||||
if (!audioEssenceFile) {
|
||||
PBD::error << string_compose (_ ("AAF: Could not create new region for clip '%1': Missing audio essence"), audioEssenceFile->unique_name) << endmsg;
|
||||
/* should not happen */
|
||||
PBD::error << _ ("AAF: Audio essence pointer is missing an audio essence file entry") << endmsg;
|
||||
essenceError++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!essenceName) {
|
||||
essenceName = aafAudioClip->essencePointerList->essenceFile->name;
|
||||
}
|
||||
|
||||
if (audioEssenceFile->is_embedded) {
|
||||
if (aafi_extractAudioEssenceFile (aafi, audioEssenceFile, AAFI_EXTRACT_DEFAULT, media_cache_path.c_str (), 0, 0, NULL, NULL) < 0) {
|
||||
PBD::error << string_compose ("AAF: Could not extract audio file '%1' from AAF.", audioEssenceFile->unique_name) << endmsg;
|
||||
|
||||
Reference in New Issue
Block a user