It is possible that the close callback can be called after glimagesink is changing state to NULL. Protect against that by taking the glimagesink lock and some NULL checking. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6566>