Show
Ignore:
Timestamp:
05/19/09 12:45:57 (5 years ago)
Author:
robert
Message:

From Stephan Huber, "when using windownames and switching between fullscreen and windowed
mode GraphicsWindowCocoa? crashes. Attached you'll find a fix for that bug.
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowCocoa.mm

    r10208 r10242  
    11511151        [new_win setContentView: [_window contentView]]; 
    11521152        setupNSWindow(new_win); 
    1153         [new_win setTitle: [_window title]]; 
     1153        NSString* title = (_traits.valid()) ? [NSString stringWithUTF8String: _traits->windowName.c_str()] : @""; 
     1154        [new_win setTitle: title ]; 
    11541155        [_window close]; 
    11551156        [_window release]; 
     
    12731274    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 
    12741275     
    1275     NSString* title = [NSString stringWithCString: name.c_str() encoding: NSUTF8StringEncoding]; 
     1276    NSString* title = [NSString stringWithUTF8String: name.c_str()]; 
    12761277    [_window setTitle: title]; 
    1277     [title release]; 
    12781278    [pool release]; 
    12791279}