fix audio big btn replay, new proj path, proxy fix, updated Features5
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mwindow.C
index 202a7687d073b3e4c0202258fe48942ca3e0f3da..6ad64376e6b3e47839d20d5adae6fdd49d495d3a 100644 (file)
@@ -471,6 +471,7 @@ void MWindow::init_defaults(BC_Hash* &defaults, char *config_path)
        else
                create_defaults_path(path, CONFIG_FILE);
 
+       delete defaults;
        defaults = new BC_Hash(path);
        defaults->load();
 }
@@ -746,17 +747,17 @@ void MWindow::add_plugins(ArrayList<PluginServer*> &plugins)
 
 void MWindow::init_plugin_tips(ArrayList<PluginServer*> &plugins, const char *lang)
 {
-       const char *cfg_path = File::get_cindat_path();
+       const char *dat_path = File::get_cindat_path();
        char msg_path[BCTEXTLEN];
        FILE *fp = 0;
        if( BC_Resources::language[0] ) {
                snprintf(msg_path, sizeof(msg_path), "%s/info/plugins.%s",
-                       cfg_path, lang);
+                       dat_path, lang);
                fp = fopen(msg_path, "r");
        }
        if( !fp ) {
                snprintf(msg_path, sizeof(msg_path), "%s/info/plugins.txt",
-                       cfg_path);
+                       dat_path);
                fp = fopen(msg_path, "r");
        }
        if( !fp ) return;
@@ -2275,10 +2276,9 @@ void MWindow::init_shm(const char *pfn, int64_t min)
        }
 
        fd = fopen(pfn, "w");
-       if( fd ) {
-               fprintf(fd, "0x%jx", min);
-               fclose(fd);
-       }
+       if( !fd ) return;
+       fprintf(fd, "0x%jx", min);
+       fclose(fd);
 
        fd = fopen(pfn, "r");
        if( !fd ) {