diff --git a/ChangeLog b/ChangeLog index a4a1b1e63..163e88a76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-06-05 Tommi Komulainen + + Bug #909 - OSX: missing NULL pointer handling + + * clutter/osx/clutter-stage-osx.c (ClutterGLWindow, + clutter_stage_osx_set_title): NSString:stringWithUTF8String: + does not accept NULL values, use empty string ("") instead. + Avoids potential crash. + 2008-06-05 Emmanuele Bassi * tests/Makefile.am: diff --git a/clutter/osx/clutter-stage-osx.c b/clutter/osx/clutter-stage-osx.c index 898890b5f..d1a7bd8db 100644 --- a/clutter/osx/clutter-stage-osx.c +++ b/clutter/osx/clutter-stage-osx.c @@ -57,7 +57,7 @@ clutter_stage_osx_state_update (ClutterStageOSX *self, [self setDelegate: self]; [self useOptimizedDrawing: YES]; [self setContentView: aView]; - [self setTitle:[NSString stringWithUTF8String: aTitle]]; + [self setTitle:[NSString stringWithUTF8String: aTitle ? aTitle : ""]]; stage = aStage; } return self; @@ -427,7 +427,7 @@ clutter_stage_osx_set_title (ClutterStage *stage, CLUTTER_OSX_POOL_ALLOC(); if (CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stage))) - [self->window setTitle:[NSString stringWithUTF8String:title]]; + [self->window setTitle:[NSString stringWithUTF8String: title ? title : ""]]; CLUTTER_OSX_POOL_RELEASE(); }