summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-12-14 13:01:25 +0100
committerSebastian Dröge <sebastian@centricular.com>2015-12-14 13:01:25 +0100
commitb0e9b79ca8388af44d9e4997bea55a6baae2e9e8 (patch)
tree4b76f241d372f2b73177fc3e8e81a369ddaa053d
parent4097d3df3cc4c6c0495a805fe16a7d3d456903b0 (diff)
python: Don't call Py_DECREF() on NULL
CID 1320703
-rw-r--r--plugin/gstpythonplugin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/gstpythonplugin.c b/plugin/gstpythonplugin.c
index f5e02ebc66..af1f7817eb 100644
--- a/plugin/gstpythonplugin.c
+++ b/plugin/gstpythonplugin.c
@@ -290,7 +290,8 @@ plugin_init (GstPlugin * plugin)
pyplugin = pygobject_new (G_OBJECT (plugin));
if (!pyplugin || PyModule_AddObject (gst, "__plugin__", pyplugin) != 0) {
g_critical ("Couldn't set __plugin__ attribute");
- Py_DECREF (pyplugin);
+ if (pyplugin)
+ Py_DECREF (pyplugin);
return FALSE;
}
}