Commit f9eb5b78 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

python: Check return value of g_module_symbol()

CID 1320702
parent b0e9b79c
...@@ -229,9 +229,8 @@ plugin_init (GstPlugin * plugin) ...@@ -229,9 +229,8 @@ plugin_init (GstPlugin * plugin)
GST_PLUGIN_DEPENDENCY_FLAG_NONE); GST_PLUGIN_DEPENDENCY_FLAG_NONE);
GST_LOG ("Checking to see if libpython is already loaded"); GST_LOG ("Checking to see if libpython is already loaded");
g_module_symbol (g_module_open (NULL, G_MODULE_BIND_LOCAL), "_Py_NoneStruct", if (g_module_symbol (g_module_open (NULL, G_MODULE_BIND_LOCAL),
&has_python); "_Py_NoneStruct", &has_python) && has_python) {
if (has_python) {
GST_LOG ("libpython is already loaded"); GST_LOG ("libpython is already loaded");
} else { } else {
GST_LOG ("loading libpython"); GST_LOG ("loading libpython");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment