C: added a missing error check

This commit is contained in:
Celine Mercier
2020-07-26 17:39:55 +02:00
parent e28507639a
commit f5a17bea68

View File

@ -1659,6 +1659,12 @@ int obi_import_view(const char* dms_path_1, const char* dms_path_2, const char*
else // Non-typed view
view_2 = obi_new_view(dms_2, view_name_2, NULL, NULL, (view_1->infos)->comments);
if (view_2 == NULL)
{
obidebug(1, "\nError creating the new view to import a view in a DMS");
return -1;
}
// Import line count
view_2->infos->line_count = view_1->infos->line_count;