Explorar o código

Also avoid displaying heat results if DISPLAY is empty

Samuel Thibault %!s(int64=6) %!d(string=hai) anos
pai
achega
0409614344
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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