X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Findexfile.C;h=977ad1cbfd5c99cb7239dca14479baed5570d691;hb=9982ec0a95d38f8970f645d75a760856d74c1d34;hp=0e6469e2c1d5e3fe64aebcc853d7a8738a564a98;hpb=fbdd13b462256ed4f3b35dc114385fe0b0de0dcd;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C index 0e6469e2..977ad1cb 100644 --- a/cinelerra-5.1/cinelerra/indexfile.C +++ b/cinelerra-5.1/cinelerra/indexfile.C @@ -228,7 +228,7 @@ void IndexFile::delete_index(Preferences *preferences, char index_filename[BCTEXTLEN]; char source_filename[BCTEXTLEN]; const char *path = indexable->path; - + if( !*path ) return; get_index_filename(source_filename, preferences->index_directory, index_filename, path, suffix); @@ -350,7 +350,7 @@ int IndexFile::open_source() } else { - TransportCommand command; + TransportCommand command(mwindow->preferences); command.command = NORMAL_FWD; command.get_edl()->copy_all((EDL*)indexable); command.change_type = CHANGE_ALL; @@ -374,9 +374,10 @@ void IndexFile::close_source() delete render_engine; render_engine = 0; - - delete cache; - cache = 0; + if( cache ) { + cache->remove_user(); + cache = 0; + } } int64_t IndexFile::get_required_scale()