Prechádzať zdrojové kódy

Also avoid displaying heat results if DISPLAY is empty

Samuel Thibault 6 rokov pred
rodič
commit
0409614344
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  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