diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-12-14 13:03:24 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-12-14 13:03:24 +0100 |
commit | f9eb5b78775bd7469dc8b0481042b4634221324c (patch) | |
tree | bfb44195267290e30ca70b4cf2e9b1402c4fa95b | |
parent | b0e9b79ca8388af44d9e4997bea55a6baae2e9e8 (diff) |
python: Check return value of g_module_symbol()
CID 1320702
-rw-r--r-- | plugin/gstpythonplugin.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugin/gstpythonplugin.c b/plugin/gstpythonplugin.c index af1f781..eb40388 100644 --- a/plugin/gstpythonplugin.c +++ b/plugin/gstpythonplugin.c @@ -229,9 +229,8 @@ plugin_init (GstPlugin * plugin) GST_PLUGIN_DEPENDENCY_FLAG_NONE); GST_LOG ("Checking to see if libpython is already loaded"); - g_module_symbol (g_module_open (NULL, G_MODULE_BIND_LOCAL), "_Py_NoneStruct", - &has_python); - if (has_python) { + if (g_module_symbol (g_module_open (NULL, G_MODULE_BIND_LOCAL), + "_Py_NoneStruct", &has_python) && has_python) { GST_LOG ("libpython is already loaded"); } else { GST_LOG ("loading libpython"); |