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,9 +71,12 @@ clutter_stage_cogl_unrealize (ClutterStageWindow *stage_window)
clutter_stage_window_parent_iface->unrealize (stage_window); clutter_stage_window_parent_iface->unrealize (stage_window);
#endif #endif
if (stage_cogl->onscreen != NULL)
{
cogl_object_unref (stage_cogl->onscreen); cogl_object_unref (stage_cogl->onscreen);
stage_cogl->onscreen = NULL; stage_cogl->onscreen = NULL;
} }
}
static void static void
handle_swap_complete_cb (CoglFramebuffer *framebuffer, handle_swap_complete_cb (CoglFramebuffer *framebuffer,