diff options
Diffstat (limited to 'tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm')
-rw-r--r-- | tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm index 1fd50d1e1a..e897e8c7c4 100644 --- a/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm +++ b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm @@ -74,7 +74,7 @@ void IOSGLTestContext::destroyGLContext() { } fEAGLContext = nil; } - if (RTLD_DEFAULT != fGLLibrary) { + if (nullptr != fGLLibrary) { dlclose(fGLLibrary); } } @@ -89,7 +89,8 @@ void IOSGLTestContext::onPlatformMakeCurrent() const { void IOSGLTestContext::onPlatformSwapBuffers() const { } GrGLFuncPtr IOSGLTestContext::onPlatformGetProcAddress(const char* procName) const { - return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName)); + void* handle = (nullptr == fGLLibrary) ? RTLD_DEFAULT : fGLLibrary; + return reinterpret_cast<GrGLFuncPtr>(dlsym(handle, procName)); } } // anonymous namespace |