Index: src/gpu/gl/GrGLUtil.cpp |
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp |
index b5e58554018c0560fa9fe176eb296c06f8e7bfb6..c766f13c564fe8482b589152d18e399c0548cc8a 100644 |
--- a/src/gpu/gl/GrGLUtil.cpp |
+++ b/src/gpu/gl/GrGLUtil.cpp |
@@ -102,6 +102,14 @@ void GrGLGetDriverInfo(GrGLStandard standard, |
*outDriver = kUnknown_GrGLDriver; |
*outVersion = GR_GL_DRIVER_UNKNOWN_VER; |
+ // These null checks are for test GL contexts that return nullptr in their |
+ // glGetString implementation. |
+ if (!rendererString) { |
+ rendererString = ""; |
+ } |
+ if (!versionString) { |
+ versionString = ""; |
+ } |
if (0 == strcmp(rendererString, "Chromium")) { |
*outDriver = kChromium_GrGLDriver; |