Commits

Roi Atalla committed c6f1872

Should also check for empty string.

  • Participants
  • Parent commits 1270b08

Comments (0)

Files changed (1)

File src/main/java/com/ra4king/opengl/util/ShaderProgram.java

 			throw new RuntimeException("Failure in compiling vertex shader. Error log:\n" + infoLog);
 		else {
 			System.out.print("Compiling vertex shader successfull.");
-			if(infoLog != null)
+			if(infoLog != null && !(infoLog = infoLog.trim()).isEmpty())
 				System.out.println(" Log: " + infoLog);
 			else
 				System.out.println();
 			throw new RuntimeException("Failure in compiling fragment shader. Error log:\n" + infoLog);
 		else {
 			System.out.print("Compiling fragment shader successfull.");
-			if(infoLog != null)
-				System.out.println(" Log: " + infoLog);
+			if(infoLog != null && !(infoLog = infoLog.trim()).isEmpty())
+				System.out.println(" Log:\n" + infoLog);
 			else
 				System.out.println();
 		}
 			throw new RuntimeException("Failure in linking program. Error log:\n" + infoLog);
 		else {
 			System.out.print("Linking program successfull.");
-			if(infoLog != null)
-				System.out.println(" Log: " + infoLog);
+			if(infoLog != null && !(infoLog = infoLog.trim()).isEmpty())
+				System.out.println(" Log:\n" + infoLog);
 			else
 				System.out.println();
 		}