[Bf-blender-cvs] [aa175e00338] master: Fix for T58250 fix: Blender failing to start with OpenGL context < 4.5.

Brecht Van Lommel noreply at git.blender.org
Thu Jan 3 18:31:47 CET 2019


Commit: aa175e003386fa68f7aa24a1c947e5b6ad999f6a
Author: Brecht Van Lommel
Date:   Thu Jan 3 18:28:46 2019 +0100
Branches: master
https://developer.blender.org/rBaa175e003386fa68f7aa24a1c947e5b6ad999f6a

Fix for T58250 fix: Blender failing to start with OpenGL context < 4.5.

===================================================================

M	intern/ghost/intern/GHOST_ContextGLX.cpp
M	intern/ghost/intern/GHOST_WindowX11.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp
index 8f418e4ab23..4517d2f0fec 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.cpp
+++ b/intern/ghost/intern/GHOST_ContextGLX.cpp
@@ -330,23 +330,15 @@ const bool GLXEW_ARB_create_context_robustness =
 		if (!version || version[0] < '3' || ((version[0] == '3') && (version[2] < '3'))) {
 			success = GHOST_kFailure;
 		}
-		else
+		else {
 			success = GHOST_kSuccess;
+		}
 	}
 	else {
 		/* freeing well clean up the context initialized above */
 		success = GHOST_kFailure;
 	}
 
-	if (success == GHOST_kFailure) {
-		fprintf(stderr, "Error! Unsupported graphics driver.\n");
-		fprintf(stderr, "Blender requires a graphics driver with at least OpenGL 3.3 support.\n");
-		fprintf(stderr, "The program will now close.\n");
-		fflush(stderr);
-		/* ugly, but we get crashes unless a whole bunch of systems are patched. */
-		exit(1);
-	}
-
 	GHOST_X11_ERROR_HANDLERS_RESTORE(handler_store);
 
 	return success;
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 3751f7f78ea..fb3326ea4f4 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -1376,6 +1376,12 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type
 		else
 			delete context;
 
+		/* Ugly, but we get crashes unless a whole bunch of systems are patched. */
+		fprintf(stderr, "Error! Unsupported graphics driver.\n");
+		fprintf(stderr, "Blender requires a graphics driver with at least OpenGL 3.3 support.\n");
+		fprintf(stderr, "The program will now close.\n");
+		fflush(stderr);
+		exit(1);
 	}
 
 	return NULL;



More information about the Bf-blender-cvs mailing list