build will not work unless delete the old version because 8 is greater than 1(1)
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / indexfile.C
index 0e6469e2c1d5e3fe64aebcc853d7a8738a564a98..977ad1cbfd5c99cb7239dca14479baed5570d691 100644 (file)
@@ -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()