clutter/frame-clock: Warn if frame clock is disposed while dispatching

This shouldn't happen, but warn anyway to be a bit more helpful if
things go bad.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2901>
This commit is contained in:
Jonas Ådahl 2023-03-06 23:47:02 +01:00 committed by Marge Bot
parent 8e2b370dc9
commit 7eec97626d

View File

@ -957,6 +957,8 @@ clutter_frame_clock_dispose (GObject *object)
{
ClutterFrameClock *frame_clock = CLUTTER_FRAME_CLOCK (object);
g_warn_if_fail (frame_clock->state != CLUTTER_FRAME_CLOCK_STATE_DISPATCHING);
if (frame_clock->source)
{
g_signal_emit (frame_clock, signals[DESTROY], 0);