diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/pychrysalide/analysis/binary.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/pychrysalide/analysis/binary.c b/plugins/pychrysalide/analysis/binary.c index 0fc9f38..c173605 100644 --- a/plugins/pychrysalide/analysis/binary.c +++ b/plugins/pychrysalide/analysis/binary.c @@ -180,9 +180,16 @@ static PyObject *py_loaded_binary_get_processor(PyObject *self, void *closure) binary = G_LOADED_BINARY(pygobject_get(self)); proc = g_loaded_binary_get_processor(binary); - result = pygobject_new(G_OBJECT(proc)); - - g_object_unref(G_OBJECT(proc)); + if (proc != NULL) + { + result = pygobject_new(G_OBJECT(proc)); + g_object_unref(G_OBJECT(proc)); + } + else + { + result = Py_None; + Py_INCREF(result); + } return result; |