Changeset 20983

Show
Ignore:
Timestamp:
01/03/08 11:53:24 (8 months ago)
Author:
patrick
Message:

Fixed a race condition that could cause application crashes at startup.
This is extracted from a patch posted to the vrjuggler-devel list by Daniel
Shipton.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vrjuggler/vrj/Draw/OpenGL/WindowCocoa.mm

    r20974 r20983  
    211211                                         inputHandling:handle_input]; 
    212212      mMainView = mGlView; 
    213  
    214       // mCocoaWindow retains a refernece to mGlView, meaning that the 
    215       // reference count on it is now two. We release our reference to mGlView 
    216       // later when we are done with it. 
    217       [mCocoaWindow setContentView:mGlView]; 
    218       [mCocoaWindow setInitialFirstResponder:mGlView]; 
    219213 
    220214      // If the window is full screen, then it has to be at the shielding 
     
    263257         makeCurrent(); 
    264258         // TODO: Add extension loading stuff. 
     259 
     260         // mCocoaWindow retains a refernece to mGlView, meaning that the 
     261         // reference count on it is now two. We release our reference to 
     262         // mGlView later when we are done with it. 
     263         [mCocoaWindow setContentView:mGlView]; 
     264         [mCocoaWindow setInitialFirstResponder:mGlView]; 
    265265      } 
    266266   }