mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
osx: Add more checks to the redraw function
The redraw function might be called during destruction phase, when the Stage state has not entirely been tore down. We need to be slightly more resilient to that scenario.
This commit is contained in:
parent
d846f5fe6a
commit
9fa85ee9bf
@ -192,13 +192,24 @@ clutter_backend_osx_ensure_context (ClutterBackend *backend,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_backend_osx_redraw (ClutterBackend *backend, ClutterStage *wrapper)
|
||||
clutter_backend_osx_redraw (ClutterBackend *backend,
|
||||
ClutterStage *wrapper)
|
||||
{
|
||||
ClutterStageWindow *impl = _clutter_stage_get_window (wrapper);
|
||||
ClutterStageOSX *stage_osx = CLUTTER_STAGE_OSX (impl);
|
||||
ClutterStageWindow *impl;
|
||||
ClutterStageOSX *stage_osx;
|
||||
|
||||
if (CLUTTER_ACTOR_IN_DESTRUCTION (wrapper))
|
||||
return;
|
||||
|
||||
impl = _clutter_stage_get_window (wrapper);
|
||||
if (impl == NULL)
|
||||
return;
|
||||
|
||||
stage_osx = CLUTTER_STAGE_OSX (impl);
|
||||
|
||||
CLUTTER_OSX_POOL_ALLOC();
|
||||
|
||||
if (stage_osx->view != NULL)
|
||||
[stage_osx->view setNeedsDisplay: YES];
|
||||
|
||||
CLUTTER_OSX_POOL_RELEASE();
|
||||
|
Loading…
Reference in New Issue
Block a user