diff --git a/tv_rename.cpp b/tv_rename.cpp index 22bab85..381479b 100644 --- a/tv_rename.cpp +++ b/tv_rename.cpp @@ -306,6 +306,9 @@ void singleSeason( const string &path, string &show, int season, string id, auto renamed_files = getRenamedFiles( show, season, id, language, pattern, linux, *files_ptr, dvd ); + if( renamed_files.empty() ) + goto end; + if ( print || !trust ) { for ( auto renamed = renamed_files.begin(); renamed != renamed_files.end(); ++renamed ) { @@ -335,6 +338,7 @@ void singleSeason( const string &path, string &show, int season, string id, } } +end: if ( found_files != nullptr ) { delete found_files; }