cogl/stage: Protect against multiple invocation of unrealize()

This commit is contained in:
Emmanuele Bassi 2011-09-09 13:52:55 +01:00
parent 802b9d463c
commit 598e7a4a7e

View File

@ -71,8 +71,11 @@ clutter_stage_cogl_unrealize (ClutterStageWindow *stage_window)
clutter_stage_window_parent_iface->unrealize (stage_window);
#endif
cogl_object_unref (stage_cogl->onscreen);
stage_cogl->onscreen = NULL;
if (stage_cogl->onscreen != NULL)
{
cogl_object_unref (stage_cogl->onscreen);
stage_cogl->onscreen = NULL;
}
}
static void