Browse Source

Also avoid displaying heat results if DISPLAY is empty

Samuel Thibault 6 years ago
parent
commit
0409614344
1 changed files with 2 additions and 1 deletions
  1. 2 1
      examples/heat/heat.c

+ 2 - 1
examples/heat/heat.c

@@ -804,7 +804,8 @@ int main(int argc, char **argv)
 	}
 
 #ifdef STARPU_OPENGL_RENDER
-	if (getenv("DISPLAY"))
+	const char *display = getenv("DISPLAY");
+	if (display && display[0])
 		opengl_render(ntheta, nthick, result, pmesh, argc, argv);
 #endif