Kaydet (Commit) 229891d6 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

lets do that before we delete our object

Change-Id: I8c7166ba66f74f5c548bb6fb30dfc3d28880e9a2
üst 145ad196
......@@ -114,13 +114,14 @@ void OpenGLContext::AddRef(SalGraphicsImpl* pImpl)
void OpenGLContext::DeRef(SalGraphicsImpl* pImpl)
{
assert(mnRefCount > 0);
if( --mnRefCount == 0 )
delete this;
auto it = maParents.find(pImpl);
if(it != maParents.end())
maParents.erase(it);
assert(mnRefCount > 0);
if( --mnRefCount == 0 )
delete this;
}
#else
void OpenGLContext::AddRef()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment