Fixed a bug with the DMS counter being wrongly initialized to 0 instead

of 1 (generating memory bugs when using the counter)
This commit is contained in:
Celine Mercier
2018-10-29 16:12:37 +01:00
parent 6305282305
commit b11d52d630

View File

@ -588,7 +588,7 @@ static int list_dms(OBIDMS_p dms)
if (global_opened_dms_list[i] == NULL)
{ // new dms
global_opened_dms_list[i] = dms;
global_opened_dms_counter_list[i] = 0;
global_opened_dms_counter_list[i] = 1;
}
else
{ // already opened dms
@ -1543,7 +1543,7 @@ int obi_import_view(const char* dms_path_1, const char* dms_path_2, const char*
// Create new view
if (strcmp((view_1->infos)->view_type, VIEW_TYPE_NUC_SEQS) == 0)
view_2 = obi_new_view_nuc_seqs(dms_2, view_name_2, NULL, NULL, (view_1->infos)->comments, false);
view_2 = obi_new_view_nuc_seqs(dms_2, view_name_2, NULL, NULL, (view_1->infos)->comments, false, false);
else // Non-typed view
view_2 = obi_new_view(dms_2, view_name_2, NULL, NULL, (view_1->infos)->comments);
@ -1596,10 +1596,10 @@ int obi_import_view(const char* dms_path_1, const char* dms_path_2, const char*
-1,
NULL,
false) < 0)
{
obidebug(1, "\nError adding a column to a view while importing it");
return -1;
}
{
obidebug(1, "\nError adding a column to a view while importing it");
return -1;
}
}
// Close the views