Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_trjcat.c
index e13434df5543e92f9d6659320b0a1836c13aaabc..4a47131b235f1339e4968e2aaa0c4b6f81e58ce4 100644 (file)
@@ -647,6 +647,10 @@ int gmx_trjcat(int argc, char *argv[])
         {
             if (ftpout == efTNG)
             {
+                if (ftpout != ftpin)
+                {
+                    gmx_fatal(FARGS, "When writing TNG the input file format must also be TNG");
+                }
                 if (bIndex)
                 {
                     trjtools_gmx_prepare_tng_writing(out_file, 'w', NULL, &trxout,