From 23ec5aeb839a039f96e686a9083b793cc635a15c Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 15 Nov 2016 22:56:25 +1100 Subject: [PATCH] glwindow/cocoa: remove our view from the parent when closing Otherwise, when the application reuses the same UIView, we were getting draw notifications on the previous view/layer's which weren't valid anymore and were referencing pointers that had been freed. https://bugzilla.gnome.org/show_bug.cgi?id=753003 --- gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 1 + 1 file changed, 1 insertion(+) diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index 0c005af9d3..60d4e57418 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -197,6 +197,7 @@ gst_gl_window_cocoa_close (GstGLWindow *window) { GstGLWindowCocoa *window_cocoa = GST_GL_WINDOW_COCOA (window); + [[window_cocoa->priv->internal_win_id contentView] removeFromSuperview]; [window_cocoa->priv->internal_win_id release]; window_cocoa->priv->internal_win_id = nil; }