VirtualBox

Ignore:
Timestamp:
Jan 25, 2013 1:41:01 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: context destruction fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c

    r44290 r44377  
    185185    context = (ContextInfo *) crHashtableSearch(render_spu.contextTable, ctx);
    186186    CRASSERT(context);
     187
     188    curCtx = GET_CONTEXT_VAL();
     189    CRASSERT(curCtx);
     190    if (curCtx == context)
     191    {
     192        renderspuMakeCurrent( 0, 0, 0 );
     193        curCtx = GET_CONTEXT_VAL();
     194                Assert(curCtx);
     195                Assert(curCtx != context);
     196    }
     197
    187198    renderspu_SystemDestroyContext( context );
    188199    if (context->extensionString) {
     
    191202    }
    192203    crHashtableDelete(render_spu.contextTable, ctx, crFree);
    193 
    194     curCtx = GET_CONTEXT_VAL();
    195     if (curCtx == context)
    196         SET_CONTEXT_VAL(NULL);
    197204}
    198205
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette