vulkandisplay: Also free the GSource

NULL checking the main_context does not help as we've just destroyed the
GMainContext and set that field to NULL, not to mention it's unnecessary.

Fixes a leak of display's GSource.
This commit is contained in:
Matthew Waters 2019-08-22 17:23:39 +10:00
parent 1b7e83c584
commit b43651cf99

View file

@ -171,7 +171,7 @@ gst_vulkan_display_finalize (GObject * object)
display->priv->event_thread = NULL; display->priv->event_thread = NULL;
g_mutex_unlock (&display->priv->thread_lock); g_mutex_unlock (&display->priv->thread_lock);
if (display->main_context && display->event_source) { if (display->event_source) {
g_source_destroy (display->event_source); g_source_destroy (display->event_source);
g_source_unref (display->event_source); g_source_unref (display->event_source);
} }