From c7d5b774d53d88609df89cf404e2d728f4ea2ddf Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 7 Feb 2022 16:33:03 +1100 Subject: [PATCH] registry: check the return value of g_win32_get_package_installation_directory_of_module() g_win32_get_package_installation_directory_of_module() may return NULL in some circumstances and we need to deal with that. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/996 Part-of: --- subprojects/gstreamer/gst/gstregistry.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gstreamer/gst/gstregistry.c b/subprojects/gstreamer/gst/gstregistry.c index 1c5bc324d9..21ccb74d73 100644 --- a/subprojects/gstreamer/gst/gstregistry.c +++ b/subprojects/gstreamer/gst/gstregistry.c @@ -1555,9 +1555,14 @@ priv_gst_get_relocated_libgstreamer (void) { char *base_dir; + GST_DEBUG ("attempting to retrieve libgstreamer-1.0 location using " + "Win32-specific method"); + base_dir = g_win32_get_package_installation_directory_of_module (_priv_gst_dll_handle); + if (!base_dir) + return NULL; dir = g_build_filename (base_dir, GST_PLUGIN_SUBDIR, NULL); GST_DEBUG ("using DLL dir %s", dir);