Merge branch 'origin/release-2020' into master
[alexxy/gromacs.git] / src / gromacs / fileio / matio.cpp
index cf91196e0ef5440f8a8ab82a60ebbe3b3ff41ad5..8e1873867cb62076882fbcc7718957e8f7e4d93b 100644 (file)
@@ -293,7 +293,7 @@ static t_matrix read_xpm_entry(FILE* in)
         findLabelInLine(lineString, "type"); // discard the returned string
     }
 
-    if (!line || strncmp(line, "static", 6) != 0)
+    if (!line_buf || strncmp(line_buf, "static", 6) != 0)
     {
         gmx_input("Invalid XPixMap");
     }
@@ -433,6 +433,7 @@ static t_matrix read_xpm_entry(FILE* in)
             line = line_buf;
         }
         bSetLine = TRUE;
+        GMX_RELEASE_ASSERT(line, "Need to have valid line to parse");
         if (strstr(line, "x-axis"))
         {
             line = std::strstr(line, "x-axis");