diff options
Diffstat (limited to 'ui/gfx/gl/gl_share_group.cc')
-rw-r--r-- | ui/gfx/gl/gl_share_group.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/gfx/gl/gl_share_group.cc b/ui/gfx/gl/gl_share_group.cc index fa2bfcb..21c175e 100644 --- a/ui/gfx/gl/gl_share_group.cc +++ b/ui/gfx/gl/gl_share_group.cc @@ -20,11 +20,19 @@ void GLShareGroup::RemoveContext(GLContext* context) { } void* GLShareGroup::GetHandle() { + GLContext* context = GetContext(); + if (context) + return context->GetHandle(); + + return NULL; +} + +GLContext* GLShareGroup::GetContext() { for (ContextSet::iterator it = contexts_.begin(); it != contexts_.end(); ++it) { - if ((*it)->GetHandle()) - return (*it)->GetHandle(); + if ((*it)->GetHandle()) + return *it; } return NULL; |