From ac1a2297f5c48f29fbddabe828b7d3bcf6d3da10 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 2 Jul 2013 22:45:08 +1000 Subject: [PATCH] [726/906] window: don't call a NULL destroy function --- gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 5 +++-- gst-libs/gst/gl/win32/gstglwindow_win32.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index 2c3cb3e..497416b 100755 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -772,8 +772,9 @@ gst_gl_window_cocoa_get_gl_api (GstGLWindow * window) NSAutoreleasePool *pool; m_cocoa->priv->running = FALSE; - m_callback (m_data); - + if (m_callback) + m_callback (m_data); + #ifdef GNUSTEP pool = [[NSAutoreleasePool alloc] init]; if ([NSApp isRunning]) diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.c b/gst-libs/gst/gl/win32/gstglwindow_win32.c index 35735b9..0fdf31c 100644 --- a/gst-libs/gst/gl/win32/gstglwindow_win32.c +++ b/gst-libs/gst/gl/win32/gstglwindow_win32.c @@ -525,7 +525,8 @@ window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) GST_DEBUG ("WM_GST_GL_WINDOW_QUIT\n"); - destroy_cb ((gpointer) wParam); + if (destroy_cb) + destroy_cb ((gpointer) wParam); parent_id = GetProp (hWnd, "gl_window_parent_id"); if (parent_id) { -- 2.7.4