mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
OSX: handle gracefully NULL title
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.
This commit is contained in:
parent
2d29f11cf6
commit
e783591eab
@ -1,3 +1,12 @@
|
|||||||
|
2008-06-05 Tommi Komulainen <tommi.komulainen@iki.fi>
|
||||||
|
|
||||||
|
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 <ebassi@openedhand.com>
|
2008-06-05 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* tests/Makefile.am:
|
* tests/Makefile.am:
|
||||||
|
@ -57,7 +57,7 @@ clutter_stage_osx_state_update (ClutterStageOSX *self,
|
|||||||
[self setDelegate: self];
|
[self setDelegate: self];
|
||||||
[self useOptimizedDrawing: YES];
|
[self useOptimizedDrawing: YES];
|
||||||
[self setContentView: aView];
|
[self setContentView: aView];
|
||||||
[self setTitle:[NSString stringWithUTF8String: aTitle]];
|
[self setTitle:[NSString stringWithUTF8String: aTitle ? aTitle : ""]];
|
||||||
stage = aStage;
|
stage = aStage;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
@ -427,7 +427,7 @@ clutter_stage_osx_set_title (ClutterStage *stage,
|
|||||||
CLUTTER_OSX_POOL_ALLOC();
|
CLUTTER_OSX_POOL_ALLOC();
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stage)))
|
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();
|
CLUTTER_OSX_POOL_RELEASE();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user