mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +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,14 +192,25 @@ 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();
|
||||
|
||||
[stage_osx->view setNeedsDisplay: YES];
|
||||
if (stage_osx->view != NULL)
|
||||
[stage_osx->view setNeedsDisplay: YES];
|
||||
|
||||
CLUTTER_OSX_POOL_RELEASE();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user